Operating System - Linux
1831289 Members
3133 Online
110022 Solutions
New Discussion

Squirrelmail - apache set sender to user@ part of in-addr.arpa

 
Geoff Wild
Honored Contributor

Squirrelmail - apache set sender to user@ part of in-addr.arpa

I have 2 servers - running FC4 - thought they were the same.

On one server, squirrelmail sends mail just fine - sets the domain name correctly:

May 5 07:09:35 server1 sendmail[29265]: k45E9Zm9029265: from=gjwild@mydomain.com, size=563, class=0, nrcpts=1, msgid=<36063.X.X.X.X.1146838175.squirrel@server1.mydomain.com>, relay=apache@localhost

But on the other server:

May 5 08:20:39 server2 sendmail[5066]: k45FKdnl005066: from=gjwild@228.60, size=532, class=0, nrcpts=1, msgid=<57249.X.X.X.X.1146842439.squirrel@Y.Y.Y.Y>, relay=apache@localhost
May 5 08:20:39 server2 sendmail[5067]: k45FKdDI005067: ruleset=check_mail, arg1=, relay=localhost [127.0.0.1], reject=553 5.1.8 ... Domain of sender address gjwild@228.60 does not exist

Why is it setting the domain name incorrectly?

Real domains/ip's hidden to protect the innocent...

From the commaind lin on server2, mail -s works fine - so I know it isn't sendmail config. Something in apache or squirrelmail? The squirrelmail config.php is the same on both servers...

Any ideas?

Thanks...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
13 REPLIES 13
Ivan Ferreira
Honored Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

Is the $domain parameter is config.php explicitly set?

Try logging as the apache user and run:

sendmail -v -f sender@domain recipient@domain.
sendmail -v -f sender recipient@domain

Do you get the domain as 228.60 or this is just a recorted version to protect your client?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Geoff Wild
Honored Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

Can't login in as apache - restricted id :)


On both servers:
grep domain /etc/squirrelmail/config.php

$domain = 'localhost';

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

Yes - for some reason the doamin is set to 228.60 - which is the last 2 octets of the ip of the server...

IE: server2's ip is: 192.168.228.60

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

I temporarily enabled apache for login...

First way, it worked...second way:

/usr/sbin/sendmail -v -f gjwild gwild@another.email.com

Worked as well - but added the hostename to the MAIL From: gjwild@server2.mydomain.com

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

I'm pretty sure this isn't a squirrelmail issue - as I put my entire /usr/share/squirrelmail dir from server2 on server1 - and server1 was able to send correctly - has to be apache and/or sendmail????

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Ivan Ferreira
Honored Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

Just to see if the behaviour changes, try setting a domain name in $domain instead of localdomain.

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Geoff Wild
Honored Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

Nope - same result.... :(
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

OMG...

Found the issue...

AT the office where I work (day job), for some reason, the browser set my http:// to the ip instead of the virtual hostname!

IE, instead of the url: http://webmail.mydomain.com/src/webmail.php it was http://192.168.228.60/src/webmail.php

That's where squirrelmail/apache was getting the 228.60 from!

As soon as I changed it to the non ip based url - sending email worked!

Sigh....

I learned some more - and I hope this helps someone else in the future.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Ivan Ferreira
Honored Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

Too weird, what do you get in /etc/nsswitch.conf /etc/networks and /etc/resolv.conf? Is the same for both servers?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

Sorry, my last post was while closing.

Interesting problem.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Geoff Wild
Honored Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

Very strange indeed...

I do "virtual hosting" so I can hard code the domain name - so the plugin for squirrelmail figures out your domain name from the url it was accessed from.

IE - if webmail.mydomain.com then the user is me@mydomain.com

If I hosted for you, the webmail.yourdomain.com would set the user as you@yourdomain.com and so on.

I guess I could add a some sort of check and if it sees an ipaddress instead, then it either sets a default (that would be bad for virtual domains) or asks you to tell it what the domain should be (bad as well - as the user could say set it to joehack@imaspammer.com).

I guess the best would be to not allow login at all if there is no domain in the url.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

Shalom Geoff,

Not to beat a closed thread, but I've found squirrellmail will use the genericstable for outbound mail, assuming that genericstable features is enabled in sendmail.

If you bump sendmail logging up to 16 you will see this in the maillog file when squirrelmail sends mail.

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
Steven E. Protter
Exalted Contributor

Re: Squirrelmail - apache set sender to user@ part of in-addr.arpa

I have an idea why my email to you failed. Someone at your shop may have hardened DNS and added a no recursion; directive to the DNS server.

I know this because our team did the same thing to one of our DNS servers and it suddenly lost the ability to resovlve domains over which it did not have authority.

I recommend immediate attention to that one to avoid loss of mail.

We backed out the change when testing caused this bad result.

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