3

I want to send emails from my work computers so that I can notify myself when various long-running tasks are completed. As I understand it, the command below looks up bar.com's MX record, makes a connection to the mail server and does SMTP to send the message:

echo “Hello world” | mail -s “Hello world” foo@bar.com

What do I need to know so that I can avoid being flagged/blocked as a spammer?

  • 2
    Not sending spam in first place. – Braiam Jul 28 '13 at 13:05
  • 1
    Why do you expect sending using mail to be different than sending with anything else? (And what does this have to do with Unix or Linux?) – Mat Jul 28 '13 at 13:45
  • I think mail relies on some other software in order to send beyond the box, so don't assume this will work at all until you try it. – goldilocks Jul 28 '13 at 13:56
  • This question appears to be off-topic because it has nothing to do with anything Linux/Unix specific – Anthon Jul 28 '13 at 20:02
  • @Anthon: Ok, I flagged to have it deleted, sorry for asking. – user3243135 Jul 28 '13 at 22:21
4

There is no difference between sending mail via the mail command or via any other program. As such a mail send via mail (1) is not more nor less likely to be identified as spam.

( I would add that this is the default way in which many non-cron tasks send you their mail, but I have no evidence to back that up. )

As to avoid having your mail seen as spam: Make sure that your mail does not look like spam. E.g. not just a single HTML link, not just a picture. No l33t spelling. Valid origins. Etc etc. Non of these are specific to the mail command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.