Operating System - HP-UX
1748171 Members
4410 Online
108758 Solutions
New Discussion юеВ

Re: root mail forwarding stopped working ???

 
Bob_16
Frequent Advisor

root mail forwarding stopped working ???

We've had a .forward file for root on a 11.00 server for quite some time, and root mail forwarding has been working. Until last Thursday. I haven't gotten an email since.

Does anyone know what i could do to fix this? Mail is getting to root's inbox ok, i can still read root's mail. But it isn't getting forwarded. The .forward file hasn't been modified recently.

thanks.
12 REPLIES 12
John Dvorchak
Honored Contributor

Re: root mail forwarding stopped working ???

Have the permissions on your .forward file changed? They should be:

root> ll .forward
-r-------- 1 root sys 15 Mar 10 2003 .forward


Check not only perms but also owner and group. If that is ok, then try bouncing sendmail and look for errors in /var/adm/syslog/mail.log.
If it has wheels or a skirt, you can't afford it.
Sridhar Bhaskarla
Honored Contributor

Re: root mail forwarding stopped working ???

Hi,

Along with the suggestion above, look at /var/adm/syslog/mail.log for more information. If there are any syntax errors or permissions issues, they will be logged in there.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: root mail forwarding stopped working ???

do a diagnostic email

sendmail -v -d8.99 -d38.99 root
steve was here

.


You will see it forward or you will see the error right on your screen.

or tail -f the mail.log file and shoot an email to the user.

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
Bob_16
Frequent Advisor

Re: root mail forwarding stopped working ???

The mail.log shows something like this:

Sep 16 23:14:28 ukx1 sendmail[19108]: XAA19108: forward /.forward.ukx1: World writable directory
Sep 16 23:14:28 ukx1 sendmail[19108]: XAA19108: forward /.forward: World writable directory

The sendmail test/debug shows this:

sendmail -v -d8.99 -d38.99 root
seq_map_parse(aliases.files, )
WARNING: World writable directory /var
map_init(sequence:aliases.files, NULL, 0)
sequence:aliases.files NULL: valid
map_init(implicit:Alias0, /etc/mail/aliases, 0)
wrong pass (pass = 0, rebuildable = 1)
map_init(host:host, NULL, 0)
host:host NULL: valid
map_init(switch:aliases, aliases, 0)
switch_map_open(aliases, aliases, 0)
switch_map_find => 1
files
map_stack[0] = sequence:aliases.files
switch:aliases aliases: valid
map_init(dequote:dequote, NULL, 0)
dequote:dequote NULL: valid
map_init(sequence:aliases.files, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(implicit:Alias0, /etc/mail/aliases, 1)
impl_map_open(Alias0, /etc/mail/aliases, 0)
hash_map_open(Alias0, /etc/mail/aliases, 0)
impl_map_lookup(Alias0, @)
db_map_lookup(Alias0, @)
implicit:Alias0 /etc/mail/aliases: valid
map_init(host:host, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(switch:aliases, aliases, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(dequote:dequote, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
seq_map_lookup(aliases, root)
seq_map_lookup(aliases.files, root)
impl_map_lookup(Alias0, root)
db_map_lookup(Alias0, root)
root... forward: /.forward.ukx1: World writable directory
root... forward: /.forward: World writable directory

another test from root on ukx1
.
root... Connecting to local...
root... Sent
closemaps: closing aliases.files (NULL)
closemaps: closing Alias0 (/etc/mail/aliases)
impl_map_close(Alias0, /etc/mail/aliases, 12a3)
db_map_close(Alias0, /etc/mail/aliases, 12a3)
closemaps: closing host (NULL)
closemaps: closing aliases (aliases)
closemaps: closing dequote (NULL)

The permissions for .forward are 744 root sys
Sridhar Bhaskarla
Honored Contributor

Re: root mail forwarding stopped working ???

Hi,

Check the permissions on the root's home directory. / or /root whatever is defined as your root's home.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
John Dvorchak
Honored Contributor

Re: root mail forwarding stopped working ???

It certainly looks like a permission problem. If you patched or updated sendmail recently it pays more attention to the permissions on certain files and directories. The parent directory of the .forward file must NOT be world writable so it should look like this at the least:
drwxr-xr-x 13 root sys 2048 Sep 17 00:07 root

and the perms on the .forward file should be 400 as I indicated earlier. While you are at it check the /etc/mail directory:
root> ll -d /etc/mail
drwxr-xr-x 2 root bin 8192 Jul 15 09:27 /etc/mail

The /etc/mail directory has to have no write access for "other".

Good luck,
John



If it has wheels or a skirt, you can't afford it.
Sundar_7
Honored Contributor

Re: root mail forwarding stopped working ???

Hi,

Post the contents of your .forward file. Are U forwarding the mail to your offical mail ID or something ?

It happens sometime that the problem is with server which is supposed to deliver the forwarded mail to your inbox.

I would check on this end as well.

Sundar.
Learn What to do ,How to do and more importantly When to do ?
Sundar_7
Honored Contributor

Re: root mail forwarding stopped working ???

Hi,

Post the contents of your .forward file. Are U forwarding the mail to your offical mail ID or something ?

It happens sometime that the problem is with server which is supposed to deliver the forwarded mail to your inbox.

I would go for a check on this end as well.

Sundar.
Learn What to do ,How to do and more importantly When to do ?
Kasper Haitsma
Trusted Contributor

Re: root mail forwarding stopped working ???

Hi Bobby,

It does not hurt, to check the mail queue either (mailq(1)).
If you send a mail directly to the address that is in the .forward, does that arrive?

HTH

Kasper
It depends