Gabriel Hahmann wrote: > Hi all, > > I'm new to the list and have a problem with my mail system. Recently > I'm receiving a lot of spam emails coming from the internet but the > sender is a user from my domain. Then I tried the same thing directly > from other system, as described below: >
The answer to your question is as such. Add 'check_sender_access pcre:/path/to/config/restrict_internal_domain' to the end of smtpd_sender_restrictions (You may use regexp instead of pcre if your postfix does not support it, use 'postconf -m' to check) /path/to/config/restrict_internal_domain: /.*\.example.com/ REJECT external email with an internal sender address > My configuration is listed below, i just changed the name of the > domain with testdomain.com <http://testdomain.com> and another domain > that this machine receive mail with anotherdomain.com > <http://anotherdomain.com>: > We recommend 'postconf -n' to make sure you did not make a typo. Also, please use example.(com|net|org) instead of making up domain names. > maximal_queue_lifetime = 4h This is amazingly short. I hope you, or the recipient, never have any network issues. > virtual_maps = hash:/etc/postfix/virtualusertable Is this a really old Postfix? This was replaced in Postfix 2.0. Most likely you mean virtual_alias_maps, but one cannot be sure. Brian