postfix mta - How to block sending outgoing mail from other domains in from field -
in postfix mail server, users able send mail on name of different domains using field in mail client software.
for eg. using sendemail mail client, , can send emails hdfc.com domain or other too,
sendemail -v -f "amit@hdfc.com" -s "test.example.in:25" -xu "amit" -xp "ami*321" -t "xyz@yahoo.co.in" -u "test sendemaili 0255" -m "this sendemail test"
this mail goes spam , did not show actual mail address in details header.
how can restrict outgoing mails such can send outgoing mails have domain test.example.in? or great if can map user's user can't use other users name.
if first case work sufficient me.
i searched lot not able this. postfix version 2.11.3-1 on debian jessie. setup have postfix sasl authentication, authentication working fine.
-- thanks
to block address don't match user email account, below line did magic. add in main.cf
smtpd_sender_restrictions = reject_sender_login_mismatch, permit_sasl_authenticated
to map system users email address
- add line in main.conf
smtpd_sender_login_maps = hash:/etc/postfix/envelope_senders
- map system user email address in /etc/postfix/envelope_senders file, amit system user
amit@test.example.in amit
- run below command, can add other system users too, whenever edit file, have run below command , reload postfix
postmap /etc/postfix/envelope_senders
, reload postfix postfix reload
it's done, no 1 can use other email address amit@test.example.in in field, if tried use reject email.
Comments
Post a Comment