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

When I sent a mail from the command line, where should it end up? (I want to bounce all invalid mail from outside because, spam.) Is there a way for it to give an error saying the user doesn't exist before it even asks for the subject?

[root@308321 postfix]# mail notthere
Subject: should bounce

Here is maillog

Oct 26 05:29:23 308321 postfix/pickup[6510]: 72F51D4775: uid=0 from=<root>
Oct 26 05:29:23 308321 postfix/cleanup[6805]: 72F51D4775: message-id=<>
Oct 26 05:29:23 308321 postfix/qmgr[6511]: 72F51D4775: from=<>, size=432, nrcpt=1 (queue active)
Oct 26 05:29:23 308321 postfix/virtual[6808]: 72F51D4775: to=<>, orig_to=<notthere>, relay=virtual, delay=0.74, delays=0.48/0.01/0/0.25, dsn=5.1.1, status=bounced (unknown user: "")
Oct 26 05:29:23 308321 postfix/cleanup[6805]: F277DD4776: message-id=<>
Oct 26 05:29:24 308321 postfix/qmgr[6511]: F277DD4776: from=<>, size=2225, nrcpt=1 (queue active)
Oct 26 05:29:24 308321 postfix/bounce[6809]: 72F51D4775: sender non-delivery notification: F277DD4776
Oct 26 05:29:24 308321 postfix/qmgr[6511]: 72F51D4775: removed
Oct 26 05:29:24 308321 postfix/virtual[6808]: F277DD4776: to=<>, relay=virtual, delay=0.56, delays=0.22/0/0/0.35, dsn=5.1.1, status=bounced (unknown user: "")
Oct 26 05:29:24 308321 postfix/qmgr[6511]: F277DD4776: removed
share|improve this question
Using postfix and virtual users. – Chloe Oct 26 '12 at 5:42
up vote 2 down vote accepted

Mail is rejected as soon as recipient is checked. If you really want to see exactly when the server reject it try using

telnet server 25

and not mail program. Here you can find out how to do it.

And here ( you can find in what point postfix checks for different restrictions you set.

share|improve this answer
Ok that worked. RCPT 550 5.1.1 <>: Recipient address rejected: User unknown in virtual mailbox table – Chloe Oct 26 '12 at 6:57
I was able to send myself spam without authentication. How is that possible? RCPT 250 2.1.5 Ok DATA 354 End data with <CR><LF>.<CR><LF> Subject: Yummy spam! – Chloe Oct 26 '12 at 6:59
Never mind. I received ` Relay access denied;` when I tried to send to my Yahoo. But it allowed me to use non-SSL. How is that possible? – Chloe Oct 26 '12 at 7:13
Non SSL is allowed but probably if you want to authenticate for sending messages to other domains (relaying) SSL will be enforced. – Laurentiu Roescu Oct 26 '12 at 7:28

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.