Sendmail aliases

I have modified /etc/aliases to reflect the correct url of my server but
I looked in /var/log/maillog and it doess not seem to be picking up the
change. I tried running newaliases but it did not seem to help. I am
assuming that this is cached somewhere but I am not sure where.

Any ideas on what I need to do to have my changes picked up?

Below is my /var/log/maillog. The value “–url http://rt.nc-soleng1
that is is picking up is not what is in my /etc/aliases file.

Thanks,
Bruce

Aug 2 10:29:18 rt sendmail[1929]: j72ETIcX001929: from=root, size=546,
class=0, nrcpts=1, msgid=200508021429.j72ETIcX001929@rt.nc-soleng1,
relay=root@localhost

Aug 2 10:29:18 rt sendmail[1929]: j72ETIcX001929:
to=root@localhost.localdomain, ctladdr=root (0/0), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=30546, relay=[127.0.0.1] [127.0.0.1],
dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Aug 2 10:29:22 rt sendmail[2076]: alias database /etc/aliases rebuilt
by root

Aug 2 10:29:22 rt sendmail[2076]: /etc/aliases: 80 aliases, longest 106
bytes, 1023 bytes total

Aug 2 10:29:22 rt sendmail[2081]: starting daemon (8.13.1):
SMTP+queueing@01:00:00

Aug 2 10:29:22 rt sm-msp-queue[2089]: starting daemon (8.13.1):
queueing@01:00:00

Aug 2 10:29:22 rt sendmail[2091]: j72ETMQS002091:
from=root@rt.nc-soleng1, size=826, class=0, nrcpts=1,
msgid=200508021429.j72ETIcX001929@rt.nc-soleng1, proto=ESMTP,
daemon=MTA, relay=rt.nc-soleng1 [127.0.0.1]

Aug 2 10:29:23 rt sm-msp-queue[2090]: j72ETIcX001929:
to=root@localhost.localdomain, ctladdr=root (0/0), delay=00:00:05,
xdelay=00:00:01, mailer=relay, pri=120546, relay=[127.0.0.1]
[127.0.0.1], dsn=2.0.0, stat=Sent (j72ETMQS002091 Message accepted for
delivery)

Aug 2 10:29:23 rt sendmail[2103]: j72ETMQS002091:
to=root@localhost.localdomain, ctladdr=root@rt.nc-soleng1 (0/0),
delay=00:00:01, xdelay=00:00:00, mailer=local, pri=31038, dsn=2.0.0,
stat=Sent

Aug 2 10:29:25 rt sendmail[2082]: j71KvcnG021991:
to="|/etc/smrsh/rt-mailgate --queue general --action correspond --url
http://rt.nc-soleng1, ctladdr=rt@rt.nc-soleng1 (8/0), delay=17:31:47,
xdelay=00:00:03, mailer=prog, pri=2640480, dsn=4.0.0, stat=Deferred:
prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL

Aug 2 10:29:29 rt sendmail[2082]: j71Kue4C021984:
to="|/etc/smrsh/rt-mailgate --queue general --action correspond --url
http://rt.nc-soleng1, ctladdr=rt@rt.nc-soleng1 (8/0), delay=17:32:49,
xdelay=00:00:04, mailer=prog, pri=2640508, dsn=4.0.0, stat=Deferred:
prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL

Aug 2 11:06:30 rt sendmail[3059]: j72F6UGv003059: from=apache,
size=1200, class=-60, nrcpts=1,
msgid=rt-3.4.2-27-388-3.16.0695647509602@example.com,
relay=apache@localhost

Aug 2 11:06:30 rt sendmail[3060]: j72F6UZ4003060:
from=apache@rt.nc-soleng1, size=1391, class=-60, nrcpts=1,
msgid=rt-3.4.2-27-388-3.16.0695647509602@example.com, proto=ESMTP,
daemon=MTA, relay=rt.nc-soleng1 [127.0.0.1]

Aug 2 11:06:30 rt sendmail[3059]: j72F6UGv003059:
to=bruce.rudd@datadirect.com, ctladdr=apache (48/48), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=139200, relay=[127.0.0.1]
[127.0.0.1], dsn=2.0.0, stat=Sent (j72F6UZ4003060 Message accepted for
delivery)

Aug 2 11:06:30 rt sendmail[3062]: j72F6UZ4003060:
to=bruce.rudd@datadirect.com, ctladdr=apache@rt.nc-soleng1 (48/48),
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=229391,
relay=mail04.americas.progress.com. [10.30.140.15], dsn=2.0.0, stat=Sent
( rt-3.4.2-27-388-3.16.0695647509602@example.com Queued mail for
delivery)

I got it to work by adding the following to /etc/mail/aliases:

    ### Aliases for RT
    rt: "|rt-mailgate --debug --queue 'Unit W.O.' --action
    correspond --url http://rt.localhost/"
    rt-comment: "|rt-mailgate --queue 'Unit W.O.' --action comment
    --url http://rt.localhost/"

and the following to /etc/hosts:

    127.0.0.1               rt.localhost localhost.my.domain

and finally the following:

    ServerAlias rt.localhost

to the rt VirtualHost section in the apache httd.conf file.

This may seem quite convoluted, but it is what I had to do to get around
the fact that my RT server is behind a firewall that does some “fancy”
port redirecting to an internal network…

A.On Tue, 2005-08-02 at 11:29 -0400, Bruce Rudd wrote:

I have modified /etc/aliases to reflect the correct url of my server but
I looked in /var/log/maillog and it doess not seem to be picking up the
change. I tried running newaliases but it did not seem to help. I am
assuming that this is cached somewhere but I am not sure where.

Any ideas on what I need to do to have my changes picked up?

Below is my /var/log/maillog. The value “–url http://rt.nc-soleng1
that is is picking up is not what is in my /etc/aliases file.

Thanks,
Bruce

Aug 2 10:29:18 rt sendmail[1929]: j72ETIcX001929: from=root, size=546,
class=0, nrcpts=1, msgid=200508021429.j72ETIcX001929@rt.nc-soleng1,
relay=root@localhost

Aug 2 10:29:18 rt sendmail[1929]: j72ETIcX001929:
to=root@localhost.localdomain, ctladdr=root (0/0), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=30546, relay=[127.0.0.1] [127.0.0.1],
dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Aug 2 10:29:22 rt sendmail[2076]: alias database /etc/aliases rebuilt
by root

Aug 2 10:29:22 rt sendmail[2076]: /etc/aliases: 80 aliases, longest 106
bytes, 1023 bytes total

Aug 2 10:29:22 rt sendmail[2081]: starting daemon (8.13.1):
SMTP+queueing@01:00:00

Aug 2 10:29:22 rt sm-msp-queue[2089]: starting daemon (8.13.1):
queueing@01:00:00

Aug 2 10:29:22 rt sendmail[2091]: j72ETMQS002091:
from=root@rt.nc-soleng1, size=826, class=0, nrcpts=1,
msgid=200508021429.j72ETIcX001929@rt.nc-soleng1, proto=ESMTP,
daemon=MTA, relay=rt.nc-soleng1 [127.0.0.1]

Aug 2 10:29:23 rt sm-msp-queue[2090]: j72ETIcX001929:
to=root@localhost.localdomain, ctladdr=root (0/0), delay=00:00:05,
xdelay=00:00:01, mailer=relay, pri=120546, relay=[127.0.0.1]
[127.0.0.1], dsn=2.0.0, stat=Sent (j72ETMQS002091 Message accepted for
delivery)

Aug 2 10:29:23 rt sendmail[2103]: j72ETMQS002091:
to=root@localhost.localdomain, ctladdr=root@rt.nc-soleng1 (0/0),
delay=00:00:01, xdelay=00:00:00, mailer=local, pri=31038, dsn=2.0.0,
stat=Sent

Aug 2 10:29:25 rt sendmail[2082]: j71KvcnG021991:
to="|/etc/smrsh/rt-mailgate --queue general --action correspond --url
http://rt.nc-soleng1, ctladdr=rt@rt.nc-soleng1 (8/0), delay=17:31:47,
xdelay=00:00:03, mailer=prog, pri=2640480, dsn=4.0.0, stat=Deferred:
prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL

Aug 2 10:29:29 rt sendmail[2082]: j71Kue4C021984:
to="|/etc/smrsh/rt-mailgate --queue general --action correspond --url
http://rt.nc-soleng1, ctladdr=rt@rt.nc-soleng1 (8/0), delay=17:32:49,
xdelay=00:00:04, mailer=prog, pri=2640508, dsn=4.0.0, stat=Deferred:
prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL

Aug 2 11:06:30 rt sendmail[3059]: j72F6UGv003059: from=apache,
size=1200, class=-60, nrcpts=1,
msgid=rt-3.4.2-27-388-3.16.0695647509602@example.com,
relay=apache@localhost

Aug 2 11:06:30 rt sendmail[3060]: j72F6UZ4003060:
from=apache@rt.nc-soleng1, size=1391, class=-60, nrcpts=1,
msgid=rt-3.4.2-27-388-3.16.0695647509602@example.com, proto=ESMTP,
daemon=MTA, relay=rt.nc-soleng1 [127.0.0.1]

Aug 2 11:06:30 rt sendmail[3059]: j72F6UGv003059:
to=bruce.rudd@datadirect.com, ctladdr=apache (48/48), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=139200, relay=[127.0.0.1]
[127.0.0.1], dsn=2.0.0, stat=Sent (j72F6UZ4003060 Message accepted for
delivery)

Aug 2 11:06:30 rt sendmail[3062]: j72F6UZ4003060:
to=bruce.rudd@datadirect.com, ctladdr=apache@rt.nc-soleng1 (48/48),
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=229391,
relay=mail04.americas.progress.com. [10.30.140.15], dsn=2.0.0, stat=Sent
( rt-3.4.2-27-388-3.16.0695647509602@example.com Queued mail for
delivery)


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

I don’t have an aliases file in /etc/mail just in /etc. What I am
trying to figure out is why I can change /etc/aliases I don’t see those
changes reflected in the maillog. I found my changes at some point
because I added the lines that I see in there but when I edit them
nothing changes.

Is sendmail saving another copy of this somewhere?

Regards,
Bruce Rudd
Solutions Engineer
DataDirect Technologies
www.DataDirect.com

Check and log cases on the web with SupportLink Online
Interact with Peers and exchange information with our Developer’s Forums
You may reach a SupportLink Engineer at (888) 332-6797From: Antonio Bemfica [mailto:antonio@bemfi.ca]
Sent: Tuesday, August 02, 2005 12:13 PM
To: rt-users@lists.bestpractical.com
Cc: Bruce Rudd
Subject: Re: [rt-users] sendmail aliases

I got it to work by adding the following to /etc/mail/aliases:

    ### Aliases for RT
    rt: "|rt-mailgate --debug --queue 'Unit W.O.' --action
    correspond --url http://rt.localhost/"
    rt-comment: "|rt-mailgate --queue 'Unit W.O.' --action comment
    --url http://rt.localhost/"

and the following to /etc/hosts:

    127.0.0.1               rt.localhost localhost.my.domain

and finally the following:

    ServerAlias rt.localhost

to the rt VirtualHost section in the apache httd.conf file.

This may seem quite convoluted, but it is what I had to do to get around
the fact that my RT server is behind a firewall that does some “fancy”
port redirecting to an internal network…

A.

I have modified /etc/aliases to reflect the correct url of my server
but
I looked in /var/log/maillog and it doess not seem to be picking up
the
change. I tried running newaliases but it did not seem to help. I am
assuming that this is cached somewhere but I am not sure where.

Any ideas on what I need to do to have my changes picked up?

Below is my /var/log/maillog. The value “–url http://rt.nc-soleng1
that is is picking up is not what is in my /etc/aliases file.

Thanks,
Bruce

Aug 2 10:29:18 rt sendmail[1929]: j72ETIcX001929: from=root,
size=546,
class=0, nrcpts=1, msgid=200508021429.j72ETIcX001929@rt.nc-soleng1,
relay=root@localhost

Aug 2 10:29:18 rt sendmail[1929]: j72ETIcX001929:
to=root@localhost.localdomain, ctladdr=root (0/0), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=30546, relay=[127.0.0.1]
[127.0.0.1],
dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Aug 2 10:29:22 rt sendmail[2076]: alias database /etc/aliases rebuilt
by root

Aug 2 10:29:22 rt sendmail[2076]: /etc/aliases: 80 aliases, longest
106
bytes, 1023 bytes total

Aug 2 10:29:22 rt sendmail[2081]: starting daemon (8.13.1):
SMTP+queueing@01:00:00

Aug 2 10:29:22 rt sm-msp-queue[2089]: starting daemon (8.13.1):
queueing@01:00:00

Aug 2 10:29:22 rt sendmail[2091]: j72ETMQS002091:
from=root@rt.nc-soleng1, size=826, class=0, nrcpts=1,
msgid=200508021429.j72ETIcX001929@rt.nc-soleng1, proto=ESMTP,
daemon=MTA, relay=rt.nc-soleng1 [127.0.0.1]

Aug 2 10:29:23 rt sm-msp-queue[2090]: j72ETIcX001929:
to=root@localhost.localdomain, ctladdr=root (0/0), delay=00:00:05,
xdelay=00:00:01, mailer=relay, pri=120546, relay=[127.0.0.1]
[127.0.0.1], dsn=2.0.0, stat=Sent (j72ETMQS002091 Message accepted for
delivery)

Aug 2 10:29:23 rt sendmail[2103]: j72ETMQS002091:
to=root@localhost.localdomain, ctladdr=root@rt.nc-soleng1 (0/0),
delay=00:00:01, xdelay=00:00:00, mailer=local, pri=31038, dsn=2.0.0,
stat=Sent

Aug 2 10:29:25 rt sendmail[2082]: j71KvcnG021991:
to="|/etc/smrsh/rt-mailgate --queue general --action correspond --url
http://rt.nc-soleng1, ctladdr=rt@rt.nc-soleng1 (8/0),
delay=17:31:47,
xdelay=00:00:03, mailer=prog, pri=2640480, dsn=4.0.0, stat=Deferred:
prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL

Aug 2 10:29:29 rt sendmail[2082]: j71Kue4C021984:
to="|/etc/smrsh/rt-mailgate --queue general --action correspond --url
http://rt.nc-soleng1, ctladdr=rt@rt.nc-soleng1 (8/0),
delay=17:32:49,
xdelay=00:00:04, mailer=prog, pri=2640508, dsn=4.0.0, stat=Deferred:
prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL

Aug 2 11:06:30 rt sendmail[3059]: j72F6UGv003059: from=apache,
size=1200, class=-60, nrcpts=1,
msgid=rt-3.4.2-27-388-3.16.0695647509602@example.com,
relay=apache@localhost

Aug 2 11:06:30 rt sendmail[3060]: j72F6UZ4003060:
from=apache@rt.nc-soleng1, size=1391, class=-60, nrcpts=1,
msgid=rt-3.4.2-27-388-3.16.0695647509602@example.com, proto=ESMTP,
daemon=MTA, relay=rt.nc-soleng1 [127.0.0.1]

Aug 2 11:06:30 rt sendmail[3059]: j72F6UGv003059:
to=bruce.rudd@datadirect.com, ctladdr=apache (48/48), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=139200, relay=[127.0.0.1]
[127.0.0.1], dsn=2.0.0, stat=Sent (j72F6UZ4003060 Message accepted for
delivery)

Aug 2 11:06:30 rt sendmail[3062]: j72F6UZ4003060:
to=bruce.rudd@datadirect.com, ctladdr=apache@rt.nc-soleng1
(48/48),
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=229391,
relay=mail04.americas.progress.com. [10.30.140.15], dsn=2.0.0,
stat=Sent
( rt-3.4.2-27-388-3.16.0695647509602@example.com Queued mail for
delivery)


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

I don’t have an aliases file in /etc/mail just in /etc. What I am
trying to figure out is why I can change /etc/aliases I don’t see those
changes reflected in the maillog. I found my changes at some point
because I added the lines that I see in there but when I edit them
nothing changes.

Is sendmail saving another copy of this somewhere?

Sendmail is infinitely configurable so no one can answer this
without knowing more about your system. If you can find
the sendmail.mc file you should see:
define(ALIAS_FILE', /etc/aliases’)dnl
or in sendmail.cf:
O AliasFile=/etc/aliases
You may or may not have to run ‘newaliases’ before changes
are updated in the dbm database used by the running sendmail.
You should not have to restart sendmail. Check that
/etc/aliases.db is the same age or newer than /etc/aliases.

Also, note that already-queued messages that have been
tempfailed will not check aliases again during the
next delivery attempt.

Les Mikesell
les@futuresource.com