I *think* I followed that syntax, but I'm not sure because I am not super
familiar with exim4 config. If I'm reading that correctly:

if the from header matches .*xxx.org
then
        use smtp.xxx.net
else if the subject matches SSS
then
        use mail.SSS.net
else
        use smtp.googlemail.com

Is that right? If so, since my use case is all mail goes through the paid
service except what's coming from a single address, is this what I want?

dc_smarthost='"${if 
match{${lc:$header_from:}}{myem...@somegoogledomain.com}{smtp.googlemail.com::587}{smtp.mypaidservice.com::587}}"'

In addition, is the header match case insensitive and/or can it be?

--Gregory

On Sun, Nov 27, 2022 at 02:26:26PM -0500, Marc Auslander wrote:
> On 11/27/2022 12:20 PM, Gregory Seidman wrote:
> > I send email from several email addresses. I pay for an email service for
> > both sending and receiving email, but I pull it down locally (via POP with
> > fetchmail) and send messages from my Debian server with mutt. All of those
> > email addresses wind up forwarding to the address with the paid service,
> > but I neither send nor receive messages directly with that email address.
> > One of the addresses I send from is hosted by Google, and therefore when I
> > send from that address through my paid service (which is how exim4 is
> > configured, using it as a smarthost) recipients usually see a warning about
> > the message being unverified or suspicious. This is presumably because of
> > DKIM or something.
> > 
> > What I'd like to do is configure exim4 as it is for most outgoing mail, but
> > to use GMail as the smarthost when the sender is that one particular email
> > address. Can someone guide me or give me a hint, please?
> > 
> > --Gregory
> I used a simple solution:
> 
> dc_smarthost='"${if
> match{${lc:$header_from:}}{.*xxx.org}{smtp.xxx.net::587}{${if 
> match{${lc:$header_subject:}}{SSS}{mail.SSS.net}{smtp.googlemail.com::587}}}}"'
> 
> Note you can test for any header.
> 
> 

Reply via email to