Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

A Linux machine! because a 486 is a terrible thing to waste! (By jjs@wintermute.ucr.edu, Joe Sloan)


computers / comp.mail.sendmail / Re: Email aliases using ip address syntax [a.b.c.d.] always using smarthost.

SubjectAuthor
* Email aliases using ip address syntax [a.b.c.d.] always using smarthost.Francisco Amaro
`* Re: Email aliases using ip address syntax [a.b.c.d.] always using smarthost.Andrzej Adam Filip
 `- Re: Email aliases using ip address syntax [a.b.c.d.] always using smarthost.Francisco Amaro

1
Email aliases using ip address syntax [a.b.c.d.] always using smarthost.

<61ae1c32-8b47-4d10-8716-73983a905421n@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=440&group=comp.mail.sendmail#440

 copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:a05:620a:4512:b0:67d:52fc:4792 with SMTP id t18-20020a05620a451200b0067d52fc4792mr3006922qkp.458.1649769651874;
Tue, 12 Apr 2022 06:20:51 -0700 (PDT)
X-Received: by 2002:ac8:444f:0:b0:2ed:1068:ac70 with SMTP id
m15-20020ac8444f000000b002ed1068ac70mr3208204qtn.331.1649769651667; Tue, 12
Apr 2022 06:20:51 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Tue, 12 Apr 2022 06:20:51 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.93.38; posting-account=7t19ZwoAAACNXraEyK7SoxAV62mk0mH0
NNTP-Posting-Host: 165.225.93.38
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <61ae1c32-8b47-4d10-8716-73983a905421n@googlegroups.com>
Subject: Email aliases using ip address syntax [a.b.c.d.] always using smarthost.
From: fam...@gmail.com (Francisco Amaro)
Injection-Date: Tue, 12 Apr 2022 13:20:51 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 86
 by: Francisco Amaro - Tue, 12 Apr 2022 13:20 UTC

Hello,

I'm having an issue with a simple sendmail setup, emails aliases on the form

user: remoteuser@[a.b.c.d]

are not sending the email directly to [a.b.c.d], but are always using the smart host defined in sendmail.mc

I have a mailertable with just one domain, directing all emails to our old server, that them process them directly or forwards them to other hosts.

localdomain.com relay:[192.168.254.121]

This is working fine.
And them a virtualusertable with the usernames I want to process locally;

user@domain.com localuser

The ideia behind this was to move all users from the old server to the new one, starting with the most used ones... as this is an older server not everything is well documented and we would like to keep things working...
With local delivery to local users, it's working fine. But forwarding to other servers, I have the same issues as using the local /etc/aliases file, it always use the smarthost.

Anybody has an ideia why is this happening ? What do I need to change so I can redirect emails directly to other hosts, bypassing the smarthost ?

This is on RHEL8, using sendmail 8.15

My redacted sendmail.mc is the following :

[root@mail02 mail]# egrep -v "^dnl" sendmail.mc
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`confLOG_LEVEL', `19')dnl
define(`SMART_HOST', `sh.domain.com')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confAUTH_REALM', `mail')dnl
define(`confCACERT_PATH', `/etc/mail/certs')dnl
define(`confCACERT', `/etc/mail/certs/CA.pem')dnl
define(`confTLS_SRV_OPTIONS', `V')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
VIRTUSER_DOMAIN(`localdomain.com')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
define(`LUSER_RELAY',`local:bouncedemail')
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MASQUERADE_AS(`localdomain.com')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

Access file is

Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
Connect:192.168.1.121 RELAY
Connect:172 RELAY
Connect:10.235 RELAY
Connect:10.236 RELAY
Connect:10.237 RELAY
Connect:localdomain.com RELAY
10.235.200.184 RELAY

Re: Email aliases using ip address syntax [a.b.c.d.] always using smarthost.

<anfi+o08yk0n8af-m4c2@wp.eu>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=441&group=comp.mail.sendmail#441

 copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: anf...@onet.eu (Andrzej Adam Filip)
Newsgroups: comp.mail.sendmail
Subject: Re: Email aliases using ip address syntax [a.b.c.d.] always using smarthost.
Date: Tue, 12 Apr 2022 14:57:02 +0000 (UTC)
Organization: It is for me to know and for you to find out.
Lines: 113
Message-ID: <anfi+o08yk0n8af-m4c2@wp.eu>
References: <61ae1c32-8b47-4d10-8716-73983a905421n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="23502ddc8a8c04d7511c7e6dc1b95204";
logging-data="14037"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191LLAwFqoh8QxdlVpNGstd"
Cancel-Lock: sha1:lmeo5eIrt2FZ0vVl93Bh7LKmBqA=
sha1:jdLH+LE6Tq5HFYEtqV2N9DY/lRE=
 by: Andrzej Adam Filip - Tue, 12 Apr 2022 14:57 UTC

Francisco Amaro <famaro@gmail.com> wrote:
> Hello,
>
> I'm having an issue with a simple sendmail setup, emails aliases on the form
>
> user: remoteuser@[a.b.c.d]
>
> are not sending the email directly to [a.b.c.d], but are always using the smart host defined in sendmail.mc
>
> I have a mailertable with just one domain, directing all emails to our old server, that them process them directly or forwards them to other hosts.
>
> localdomain.com relay:[192.168.254.121]
>
> This is working fine.
> And them a virtualusertable with the usernames I want to process locally;
>
> user@domain.com localuser
>
> The ideia behind this was to move all users from the old server to the
> new one, starting with the most used ones... as this is an older
> server not everything is well documented and we would like to keep
> things working...
> With local delivery to local users, it's working fine. But forwarding
> to other servers, I have the same issues as using the local
> /etc/aliases file, it always use the smarthost.
>
> Anybody has an ideia why is this happening ? What do I need to change so I can redirect emails directly to other hosts, bypassing the smarthost ?
>
> This is on RHEL8, using sendmail 8.15
>
> My redacted sendmail.mc is the following :
>
> [root@mail02 mail]# egrep -v "^dnl" sendmail.mc
> divert(-1)dnl
> include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
> VERSIONID(`setup for linux')dnl
> OSTYPE(`linux')dnl
> define(`confLOG_LEVEL', `19')dnl
> define(`SMART_HOST', `sh.domain.com')dnl
> define(`confDEF_USER_ID', ``8:12'')dnl
> define(`confTO_CONNECT', `1m')dnl
> define(`confTRY_NULL_MX_LIST', `True')dnl
> define(`confDONT_PROBE_INTERFACES', `True')dnl
> define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
> define(`ALIAS_FILE', `/etc/aliases')dnl
> define(`STATUS_FILE', `/var/log/mail/statistics')dnl
> define(`UUCP_MAILER_MAX', `2000000')dnl
> define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
> define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
> define(`confAUTH_OPTIONS', `A')dnl
> define(`confAUTH_REALM', `mail')dnl
> define(`confCACERT_PATH', `/etc/mail/certs')dnl
> define(`confCACERT', `/etc/mail/certs/CA.pem')dnl
> define(`confTLS_SRV_OPTIONS', `V')dnl
> define(`confTO_IDENT', `0')dnl
> FEATURE(`no_default_msa', `dnl')dnl
> FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
> FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
> FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
> VIRTUSER_DOMAIN(`localdomain.com')dnl
> FEATURE(redirect)dnl
> FEATURE(always_add_domain)dnl
> FEATURE(use_cw_file)dnl
> FEATURE(use_ct_file)dnl
> define(`LUSER_RELAY',`local:bouncedemail')
> FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
> FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
> FEATURE(`blacklist_recipients')dnl
> EXPOSED_USER(`root')dnl
> FEATURE(`accept_unresolvable_domains')dnl
> LOCAL_DOMAIN(`localhost.localdomain')dnl
> MASQUERADE_AS(`localdomain.com')dnl
> FEATURE(masquerade_envelope)dnl
> FEATURE(masquerade_entire_domain)dnl
> MAILER(smtp)dnl
> MAILER(procmail)dnl
>
> Access file is
>
> Connect:localhost.localdomain RELAY
> Connect:localhost RELAY
> Connect:127.0.0.1 RELAY
> Connect:192.168.1.121 RELAY
> Connect:172 RELAY
> Connect:10.235 RELAY
> Connect:10.236 RELAY
> Connect:10.237 RELAY
> Connect:localdomain.com RELAY
> 10.235.200.184 RELAY

1, You can use mailertable to exclude some non local destination from
relaying via smart host. It seems that mailertable is not consulted for
"ip domains" ([a.b.c.d]

2. My classic suggestion is to use organization domain name
(example.com) and per host domain names (oldhost.example.com,
newhost.example.com).
On oldhost use mailertable to exclude newhost.example.com from smart
host routing. It should make aliases and virtusertable work with
"per host" (sub) domain names.

In case of problem use the following email routing test commands.
Each further stage stage adds extra dignostics

sendmail -bv JohnDone@some.domain
# test map lookupss including mailertable lookups
sendmail -d60.5 JohnDone@some.domain
# test also rewriting rules (no aliases)
echo '3,0 JohnDone@some.domain" | sendmail -bt -d60.5 -d21.12

--
[Andrew] Andrzej A. Filip

Re: Email aliases using ip address syntax [a.b.c.d.] always using smarthost.

<d5c266eb-99f0-4fa5-b4f5-00716c08ede2n@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=442&group=comp.mail.sendmail#442

 copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:a05:622a:14c8:b0:2e1:d626:66ea with SMTP id u8-20020a05622a14c800b002e1d62666eamr4077505qtx.58.1649781406242;
Tue, 12 Apr 2022 09:36:46 -0700 (PDT)
X-Received: by 2002:a25:2c89:0:b0:641:2884:b52e with SMTP id
s131-20020a252c89000000b006412884b52emr11044361ybs.506.1649781406039; Tue, 12
Apr 2022 09:36:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Tue, 12 Apr 2022 09:36:45 -0700 (PDT)
In-Reply-To: <anfi+o08yk0n8af-m4c2@wp.eu>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.93.38; posting-account=7t19ZwoAAACNXraEyK7SoxAV62mk0mH0
NNTP-Posting-Host: 165.225.93.38
References: <61ae1c32-8b47-4d10-8716-73983a905421n@googlegroups.com> <anfi+o08yk0n8af-m4c2@wp.eu>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d5c266eb-99f0-4fa5-b4f5-00716c08ede2n@googlegroups.com>
Subject: Re: Email aliases using ip address syntax [a.b.c.d.] always using smarthost.
From: fam...@gmail.com (Francisco Amaro)
Injection-Date: Tue, 12 Apr 2022 16:36:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 142
 by: Francisco Amaro - Tue, 12 Apr 2022 16:36 UTC

Hello Andrzej

Thank you for your help, but subdomains are not a solution here, not all hosts are on the same top level domain, we don't want to change the configuration on the oldhost, etc.

I've tried some more of the test commands, one think I noted is that virtualusertable is checked early on the process, so I've tried to do the redirect directly, but no change, it still goes via the smarthost.
I've also deployed a new clean install (without a smarthost defined) and the aliases work as expected, so it is definitely something in my config that's causing this...

I'll keep testing stuff...

A terça-feira, 12 de abril de 2022 à(s) 15:57:12 UTC+1, Andrzej Adam Filip escreveu:
> Francisco Amaro <fam...@gmail.com> wrote:
> > Hello,
> >
> > I'm having an issue with a simple sendmail setup, emails aliases on the form
> >
> > user: remoteuser@[a.b.c.d]
> >
> > are not sending the email directly to [a.b.c.d], but are always using the smart host defined in sendmail.mc
> >
> > I have a mailertable with just one domain, directing all emails to our old server, that them process them directly or forwards them to other hosts..
> >
> > localdomain.com relay:[192.168.254.121]
> >
> > This is working fine.
> > And them a virtualusertable with the usernames I want to process locally;
> >
> > us...@domain.com localuser
> >
> > The ideia behind this was to move all users from the old server to the
> > new one, starting with the most used ones... as this is an older
> > server not everything is well documented and we would like to keep
> > things working...
> > With local delivery to local users, it's working fine. But forwarding
> > to other servers, I have the same issues as using the local
> > /etc/aliases file, it always use the smarthost.
> >
> > Anybody has an ideia why is this happening ? What do I need to change so I can redirect emails directly to other hosts, bypassing the smarthost ?
> >
> > This is on RHEL8, using sendmail 8.15
> >
> > My redacted sendmail.mc is the following :
> >
> > [root@mail02 mail]# egrep -v "^dnl" sendmail.mc
> > divert(-1)dnl
> > include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
> > VERSIONID(`setup for linux')dnl
> > OSTYPE(`linux')dnl
> > define(`confLOG_LEVEL', `19')dnl
> > define(`SMART_HOST', `sh.domain.com')dnl
> > define(`confDEF_USER_ID', ``8:12'')dnl
> > define(`confTO_CONNECT', `1m')dnl
> > define(`confTRY_NULL_MX_LIST', `True')dnl
> > define(`confDONT_PROBE_INTERFACES', `True')dnl
> > define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
> > define(`ALIAS_FILE', `/etc/aliases')dnl
> > define(`STATUS_FILE', `/var/log/mail/statistics')dnl
> > define(`UUCP_MAILER_MAX', `2000000')dnl
> > define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
> > define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
> > define(`confAUTH_OPTIONS', `A')dnl
> > define(`confAUTH_REALM', `mail')dnl
> > define(`confCACERT_PATH', `/etc/mail/certs')dnl
> > define(`confCACERT', `/etc/mail/certs/CA.pem')dnl
> > define(`confTLS_SRV_OPTIONS', `V')dnl
> > define(`confTO_IDENT', `0')dnl
> > FEATURE(`no_default_msa', `dnl')dnl
> > FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
> > FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
> > FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
> > VIRTUSER_DOMAIN(`localdomain.com')dnl
> > FEATURE(redirect)dnl
> > FEATURE(always_add_domain)dnl
> > FEATURE(use_cw_file)dnl
> > FEATURE(use_ct_file)dnl
> > define(`LUSER_RELAY',`local:bouncedemail')
> > FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
> > FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
> > FEATURE(`blacklist_recipients')dnl
> > EXPOSED_USER(`root')dnl
> > FEATURE(`accept_unresolvable_domains')dnl
> > LOCAL_DOMAIN(`localhost.localdomain')dnl
> > MASQUERADE_AS(`localdomain.com')dnl
> > FEATURE(masquerade_envelope)dnl
> > FEATURE(masquerade_entire_domain)dnl
> > MAILER(smtp)dnl
> > MAILER(procmail)dnl
> >
> > Access file is
> >
> > Connect:localhost.localdomain RELAY
> > Connect:localhost RELAY
> > Connect:127.0.0.1 RELAY
> > Connect:192.168.1.121 RELAY
> > Connect:172 RELAY
> > Connect:10.235 RELAY
> > Connect:10.236 RELAY
> > Connect:10.237 RELAY
> > Connect:localdomain.com RELAY
> > 10.235.200.184 RELAY
> 1, You can use mailertable to exclude some non local destination from
> relaying via smart host. It seems that mailertable is not consulted for
> "ip domains" ([a.b.c.d]
>
> 2. My classic suggestion is to use organization domain name
> (example.com) and per host domain names (oldhost.example.com,
> newhost.example.com).
> On oldhost use mailertable to exclude newhost.example.com from smart
> host routing. It should make aliases and virtusertable work with
> "per host" (sub) domain names.
>
> In case of problem use the following email routing test commands.
> Each further stage stage adds extra dignostics
>
> sendmail -bv John...@some.domain
> # test map lookupss including mailertable lookups
> sendmail -d60.5 John...@some.domain
> # test also rewriting rules (no aliases)
> echo '3,0 John...@some.domain" | sendmail -bt -d60.5 -d21.12
>
>
> --
> [Andrew] Andrzej A. Filip

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor