Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i am sending email notifications from OSSEC active response script, but when the email is sent through it, the FROM address is like this it should be or

As the script is running from root.

i have tried with different email clients, like mail, mutt, mailx, sendEmail and other python and perl based scripts, all of them add the "-" before What could be the reason?

share|improve this question

It's fairly common to send automated alerts from email addresses that don't exist, since no one's going to bother checking the accounts for email or want to get spammed with responses to it, or end up having two systems send automatic replies to each other in an endless loop.

So, actually, you probably don't want notifications coming from a real email address.

That said, the reason you're getting alerted from is because you haven't configured the from field in your email script. If you don't tell it who to send the email from, it'll default to -, because null isn't a valid value.

Check this out for a quick Perl email script, and note the $from variable.

$from= 'webmaster@YOURDOMAIN.COM'

share|improve this answer
in all email clients, i have set the FROM address to valid one already, stil it picks the Null... – Farhan Aug 16 '12 at 12:21
@Frank Set the from field in your script, as in the webpage I linked. – HopelessN00b Aug 16 '12 at 12:24
As i said, i have already tried this wil many clients, it give the same result: Aug 16 13:49:09 mserver qmail: 1345121349.477795 delivery 33663: failure: Connected_to_92.45.5.74_but_sender_was_rejected./Remote_host_said:_501_5.1.7_Bad‌​_sender_address_syntax/ – Farhan Aug 16 '12 at 12:51
@Frank Remote_host_said:_501_5.1.7_Bad‌​_sender_address_syntax Well, that's what's wrong, then. The mail server you're sending to is telling you you're using the wrong syntax for the sender. – HopelessN00b Aug 16 '12 at 13:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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