[NBLUG/talk] Configuring sendmail to forward email via sonic.net

Ron Wickersham rjw at alembic.com
Mon Aug 26 15:18:57 PDT 2013



On Mon, 26 Aug 2013, Todd Cary wrote:

> For many years I have avoided sendmail on my Centos 5 since my PHP class does 
> the job, however I now need to have it work since my client is using 
> Concrete5 (CMS) and it is hard wired to use sendmail.
>
> Sonic uses a prot different from the standard of 25, plus sendmail has 
> properties well over my head.  Has anyone on this group configured sendmail 
> to forward through Sonic?
>
> With appreciation...
>
> Todd

hi Todd,

now i reread your original message, and are wanting to use the special
configuration that sonic uses internally, and not configuring your 
server as a standard public Mail Transport Agent which of course would
use port 25.

so what i was saying is not applicable, as i saw your ip address was
not from sonic.net so you aren't on their customer's IP address ranges.

i've never configured sendmail as you are asking, but this is from
the sendmail.com FAQ:

How do I send using an alternate port?

############################################################################

The port used for outgoing SMTP connections can be changed via the respective *_MAILER_ARGS macros for the various SMTP mailers. In a default configuration, sendmail uses either the relay mailer (for e.g. SMART_HOST when no mailer is specified) or the esmtp mailer (when sending directly to the MX of the recipient domain).

So, if you want all outgoing SMTP connections to use port 2525, you can use this in your .mc file:
define(`RELAY_MAILER_ARGS', `TCP $h 2525') define(`ESMTP_MAILER_ARGS', `TCP $h 2525')

If you want to use an alternate port only for specific destinations, change (e.g.) only the RELAY_MAILER_ARGS, and make sure the relay mailer is not used for anything else. E.g. you can have sendmail use port 2525 only when sending to your domain with this in your .mc file:
FEATURE(`mailertable') define(`confRELAY_MAILER', `esmtp') define(`RELAY_MAILER_ARGS', `TCP $h 2525')

and then in your mailertable:
yourdomain.com relay:mail.yourdomain.com

This will force sendmail to use port 2525 for connections to yourdomain.com. Of course, change 2525 to whatever alternate port number you wish to use.


############################################################################

hope that helps.

-ron

ps.   there is a program usually installed with sendmail that is a
perl script to check the sendmail.cf file.   it is called checksendmail
and there is usually a man page on your machine for that command.


More information about the talk mailing list