Operating System - Linux
1820475 Members
3276 Online
109624 Solutions
New Discussion юеВ

Configure sendmail to forward particular emails via ISP SMTP server...

 
SOLVED
Go to solution
Andrew Bruce
Valued Contributor

Configure sendmail to forward particular emails via ISP SMTP server...

Hi folks,

Sendmail is a fairly black art to me!

I have a server up and running with (amongst other things) a sendmail daemon that is working fine.

However, due to some short-sightedness of a certain mobile phone company (let's call them 'voodoofone'), if I try to forward emails from my server to my mobile phone, the emails get bounced by the voodoofone server claiming that all dynamic IPs are sources of spam, therefore the email is spam, therefore voodoofone will not upset their valued customer (even though the email is *FROM* their valued customer!).

Anyway, I digress...

I see how to configure sendmail to re-route *ALL* emails via my ISP SMTP server (from http://cri.ch/linux/docs/sk0009.html), but I don't want to do this.

All I want to do is to re-route *only* the outbound emails destined for my mobile phone (lets call the address: myfone@voodoofone.net) through my ISP's SMTP server.

Everything else should be sent out as normal from my SMTP server.

Essentially, I have a particular user account that has a .forward file configured simply forwarding all emails to my mobile. All the other user accounts should be unaffected.

Anyway, any pointers or advice would be greatly appreciated (vizzavi points :-)

Regards,

Andy Bruce
I Love it when a plan comes together!
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Configure sendmail to forward particular emails via ISP SMTP server...

I suggest:

.forward file for the user.

This points to another .forward file or system with a virtusertable on a system that either has a fixed IP address or a DS directive in sendmail.cf to a machine with an acceptable fixed ip address.

I know it seems obtuse but it will work.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Andrew Bruce
Valued Contributor

Re: Configure sendmail to forward particular emails via ISP SMTP server...

Thanks Sep,

I'll need to investigate your suggestion a bit further - you're right, it is a bit convoluted! :-}

Any other solutions still welcome though!

Thanks and regards,

Andy Bruce
I Love it when a plan comes together!
Ivan Ferreira
Honored Contributor
Solution

Re: Configure sendmail to forward particular emails via ISP SMTP server...

Andrew Bruce
Valued Contributor

Re: Configure sendmail to forward particular emails via ISP SMTP server...

Thanks Ivan,

Your suggestions lead me to looking at the mailertable:

Added an entry into /etc/mail/mailertable:

voodoofone.net smtp:[smtp.myisp.co.uk]

Now, any outbound mail going to the voodoofone.net domain gets rerouted via my ISPs smtp server.

What's more, it *works*!

Now I just have to filter out the spam! ;-)

Thanks all for your input!
I Love it when a plan comes together!
Andrew Bruce
Valued Contributor

Re: Configure sendmail to forward particular emails via ISP SMTP server...

Solution discovered!

(Apart from RTFM), put an entry into mailertable (see previous response).

Thanks again!

A.
I Love it when a plan comes together!