From: Tuc on
Hi,

I have the following in my .mc :

define(`SMART_HOST', `relay:v.example.com')dnl

My relay mailer looks like :

Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP,
R=MasqSMTP, E=\r\n, L=2040,
T=DNS/RFC822/SMTP,
A=TCP $h 2525

The problem is that for v.example.com, I have the following MX:

smtp.example.com
another.example.com

neither of which are v.example.com (Yes, v.example.com doesn't
receive mail for itself, but it does relay for me)

When I send mail, its attempting to go via smtp.example.com .
Short of putting the IP in, is there a way to overcome this?

Thanks, Tuc
From: Andrzej Adam Filip on
Tuc <tuctboh(a)gmail.com> wrote:
> I have the following in my .mc :
>
> define(`SMART_HOST', `relay:v.example.com')dnl
>
> My relay mailer looks like :
>
> Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP,
> R=MasqSMTP, E=\r\n, L=2040,
> T=DNS/RFC822/SMTP,
> A=TCP $h 2525
>
> The problem is that for v.example.com, I have the following MX:
>
> smtp.example.com
> another.example.com
>
> neither of which are v.example.com (Yes, v.example.com doesn't
> receive mail for itself, but it does relay for me)
>
> When I send mail, its attempting to go via smtp.example.com .
> Short of putting the IP in, is there a way to overcome this?

Variant 1 (general):
define(`SMART_HOST', `relay:[v.example.com]')
Put name of the smart host into square brackets to disable MX lookups.

Variant 2 (case specific):
Because *you* use modified relay mailer modify it further:

dnl modify A= part of relay mailer
define(`RELAY_MAILER_ARGS',`TCP $h 2525')dnl
dnl add F=0 flag to relay mailer (disable) MX lookups
MODIFY_MAILER(`RELAY',`+0)dnl
dnl include smtp mailers (smtp,esmtp,smtp8,dsmtp,relay) after the above
MAILER(`smtp')dnl

--
[pl>en Andrew] Andrzej Adam Filip : anfi(a)priv.onet.pl : anfi(a)xl.wp.pl
The price one pays for pursuing any profession, or calling, is an intimate
knowledge of its ugly side.
-- James Baldwin
From: Tuc on
On Jul 1, 11:51 am, Andrzej Adam Filip <a...(a)onet.eu> wrote:
> Tuc <tuct...(a)gmail.com> wrote:
> > I have the following in my .mc :
>
> > define(`SMART_HOST', `relay:v.example.com')dnl
>
> > My relay mailer looks like :
>
> > Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP,
> > R=MasqSMTP, E=\r\n, L=2040,
> > T=DNS/RFC822/SMTP,
> > A=TCP $h 2525
>
> > The problem is that for v.example.com, I have the following MX:
>
> > smtp.example.com
> > another.example.com
>
> > neither of which are v.example.com (Yes, v.example.com doesn't
> > receive mail for itself, but it does relay for me)
>
> > When I send mail, its attempting to go via smtp.example.com .
> > Short of putting the IP in, is there a way to overcome this?
>
> Variant 1 (general):
> define(`SMART_HOST', `relay:[v.example.com]')
> Put name of the smart host into square brackets to disable MX lookups.
>
> Variant 2 (case specific):
> Because *you* use modified relay mailer modify it further:
>
> dnl modify A= part of relay mailer
> define(`RELAY_MAILER_ARGS',`TCP $h 2525')dnl
> dnl add F=0 flag to relay mailer (disable) MX lookups
> MODIFY_MAILER(`RELAY',`+0)dnl
> dnl include smtp mailers (smtp,esmtp,smtp8,dsmtp,relay) after the above
> MAILER(`smtp')dnl
>


Hi,

Exactly the type of information I need... Thanks!

Tuc
From: Tuc on
On Jul 1, 11:51 am, Andrzej Adam Filip <a...(a)onet.eu> wrote:
>
> MODIFY_MAILER(`RELAY',`+0)dnl
>
Correction:

MODIFY_MAILER_FLAGS(`RELAY',`+0')dnl

Tuc