Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My question is very similar to this one, but for postfix.

We keep getting emails from addresses like "accounting@example.com" delivered to our actual "@example.com" addresses. From my google research, I understand it might not be practical to verify the email originated from our IP or VPN (Although this would be ideal, so if you can think of a way to do this, let me know), but in most of these cases the sender address (ex. "accounting") is not a valid account.

I imagine there must be a way to make sure that a local account exists before delivering the message.

share|improve this question

2 Answers 2

The best would be to add SPF to your domain: http://en.wikipedia.org/wiki/Sender_Policy_Framework

share|improve this answer

You'll want to add smtpd_reject_unlisted_sender to your smtpd_sender_restrictions.

Without a little planning this will also reject mail from root@hostname.example.com as well, so keep that in mind.


smtpd_reject_unlisted_sender
Request that the Postfix SMTP server rejects mail from unknown sender addresses. This can slow down an explosion of forged mail from worms or viruses.

An address is always considered "known" when it matches a virtual(5) alias or a canonical(5) mapping.

The sender domain matches $mydestination, $inet_interfaces or $proxy_interfaces, but the sender is not listed in $local_recipient_maps, and $local_recipient_maps is not null.

  • The sender domain matches $virtual_alias_domains but the sender is not listed in $virtual_alias_maps.
  • The sender domain matches $virtual_mailbox_domains but the sender is not listed in $virtual_mailbox_maps, and $virtual_mailbox_maps is not null.
  • The sender domain matches $relay_domains but the sender is not listed in $relay_recipient_maps, and $relay_recipient_maps is not null.

    This feature is available in Postfix 2.1 and later.

share|improve this answer

Your Answer

 
discard

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.