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=<20121026052923.72F51D4775@mail.domain.com>
Oct 26 05:29:23 308321 postfix/qmgr[6511]: 72F51D4775: from=<root@domain.com>, size=432, nrcpt=1 (queue active)
Oct 26 05:29:23 308321 postfix/virtual[6808]: 72F51D4775: to=<notthere@domain.com>, orig_to=<notthere>, relay=virtual, delay=0.74, delays=0.48/0.01/0/0.25, dsn=5.1.1, status=bounced (unknown user: "notthere@domain.com")
Oct 26 05:29:23 308321 postfix/cleanup[6805]: F277DD4776: message-id=<20121026052923.F277DD4776@mail.domain.com>
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=<root@domain.com>, relay=virtual, delay=0.56, delays=0.22/0/0/0.35, dsn=5.1.1, status=bounced (unknown user: "root@domain.com")
Oct 26 05:29:24 308321 postfix/qmgr[6511]: F277DD4776: removed
  • Using postfix and virtual users. – Chloe Oct 26 '12 at 5:42

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.

http://james.apache.org/server/rfclist/smtp/rfc0821.txt Here you can find out how to do it.

And here (http://wiki.centos.org/HowTos/postfix_restrictions) you can find in what point postfix checks for different restrictions you set.

| improve this answer | |
  • Ok that worked. RCPT TO:notthere@domain.com 550 5.1.1 <notthere@domain.com>: 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 TO:info@domain.com 250 2.1.5 Ok DATA 354 End data with <CR><LF>.<CR><LF> From:spammer@howdy.com To:info@domain.com 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 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.