Re: Intercepting mails with opensmtpd

2019-05-07 Thread Thomas Bohl

Hello,

accept from source  sender "" deliver 
to maildir "/home/mail/mydomain1/myuser/Maildir"


accept from source  sender "www-d...@mydomain2.com" deliver to 
maildir "/home/mail/mydomain1/myuser/Maildir"




Do you have an idea ?


Make sure it's above the relay rule.

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Intercepting mails with opensmtpd

2019-05-07 Thread Mik J
Hello,

I didn't find the right syntax to intercept a mail.

Server (www) => Server opensmtpd (relay) => other server such as gmail

There is spam (along with legitimate mails) coming from the www server and 
opensmtp is relaying them to other mtas such as gmail.
I wanted for a short time period to redirect all mails coming from a specific 
mail address that is relayed by opensmtpd to my mailbox. Unfortunately I 
couldn't find the right way to do so.

accept from source  sender "" deliver to 
maildir "/home/mail/mydomain1/myuser/Maildir"

 is a table containing the IP of the www server

So this rule doesn't seem to match for some reason.

Do you have an idea ?

PS: Please don't ask me to fix the security hole on the www server, it's 
interesting to know how the answer about the opensmtpd rule