NuOnce Networks Support
Last active: Never
Not logged in [Login ]
go to bottom


This forum is only available for Archive Purposes. Posting has been disabled.

Printable Version | Send to Friend
Subscribe | Add to Favorites
New Topic New Poll New Reply
Author: Subject: relaying of apache@localhost
linboogy
Junior Member






Posts 7
Registered 10-7-2005
Location USA Cincinnati Ohio
Member Is Offline

Mood:

posted on 12-3-2005 at 04:32 PM Edit Post Reply With Quote
relaying of apache@localhost

Hello, I have a php script that will e-mail a user of notifications and it gets stuck in the server because it relays its self as apache@localhost and the tail -f -n100 /var/log/maillog shows that user unknown and kicks it back to the post master account. Any light that could be shed on this issue would be greatful. Thanks
View User's Profile Visit User's Homepage View All Posts By User U2U Member
brian
Super Administrator






Posts 3136
Registered 6-9-2003
Member Is Offline

Mood: happy go lucky

posted on 12-3-2005 at 07:37 PM Edit Post Reply With Quote
That should have been fixed. I had written a patch to make sure apache got written in.

Do this:

# Fix Sendmail not having "apache" in the virtual user table
cd /etc/mail
/bin/cat virtusertable | grep "apache\@" > /dev/null
if [ $? != 0 ]; then
/usr/bin/printf "apache@`hostname`\tadmin" >> /etc/mail/virtusertable
/usr/sbin/makemap hash /etc/mail/virtusertable < virtusertable
fi

That has been tested, and that is what I had to do to make apache work for sending mail.

Other then that, not sure what to tell you!

View User's Profile Visit User's Homepage View All Posts By User U2U Member
linboogy
Junior Member






Posts 7
Registered 10-7-2005
Location USA Cincinnati Ohio
Member Is Offline

Mood:

posted on 12-3-2005 at 10:46 PM Edit Post Reply With Quote
Thanks, but it didnt work

Here is my mail log
Dec 3 17:45:50 www sendmail[2765]: jB3Mjo6Y002765: from=apache, size=327, class=0, nrcpts=1, msgid=<200512032245.jB3Mjo6Y002765@www.linboogy.com>, relay=apache@localhost
Dec 3 17:45:50 www sendmail[2765]: jB3Mjo6Y002765: to=ek@linboogy.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30327, relay=[127.0.0.1] [127.0.0.1], dsn=5.6.0, stat=Data format error
Dec 3 17:45:50 www sendmail[2765]: jB3Mjo6Y002765: jB3Mjo6Z002765: DSN: Data format error
Dec 3 17:45:50 www sendmail[2768]: jB3MjoE9002768: <apache@www.linboogy.com>... No such user here
Dec 3 17:45:50 www sendmail[2765]: jB3Mjo6Z002765: to=apache, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31351, relay=[127.0.0.1], dsn=5.3.0, stat=User unknown
Dec 3 17:45:50 www sendmail[2768]: jB3MjoE9002768: from=<>, size=1351, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Dec 3 17:45:50 www sendmail[2765]: jB3Mjo6Z002765: jB3Mjo6a002765: return to sender: User unknown
Dec 3 17:45:50 www sendmail[2768]: jB3MjoEB002768: from=<>, size=3900, class=0, nrcpts=1, msgid=<200512032245.jB3Mjo6a002765@www.linboogy.com>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Dec 3 17:45:50 www sendmail[2765]: jB3Mjo6a002765: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32375, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (jB3MjoEB002768 Message accepted for delivery)
Dec 3 17:45:50 www MailScanner[2379]: New Batch: Scanning 1 messages, 4337 bytes
Dec 3 17:45:57 www MailScanner[2379]: Virus and Content Scanning: Starting
Dec 3 17:45:58 www MailScanner[2379]: Uninfected: Delivered 1 messages
Dec 3 17:45:58 www sendmail[2783]: jB3MjoEB002768: SYSERR(root): header syntax error, line "MailScanner-Information: Please contact the postmaster for more information"
Dec 3 17:45:58 www sendmail[2783]: jB3MjoEB002768: SYSERR(root): header syntax error, line "MailScanner-From: "
Dec 3 17:45:58 www spamd[2758]: spamd: got connection over /home/av-spam/tmp/spamd.sock
Dec 3 17:45:58 www spamd[2758]: spamd: setuid to admin succeeded
Dec 3 17:45:58 www spamd[2758]: spamd: processing message <200512032245.jB3Mjo6a002765@www.linboogy.com> for admin:500
Dec 3 17:46:05 www spamd[2758]: spamd: clean message (-1.1/7.9) for admin:500 in 7.0 seconds, 4406 bytes.
Dec 3 17:46:05 www spamd[2758]: spamd: result: . -1 - ALL_TRUSTED,AWL scantime=7.0,size=4406,user=admin,uid=500,required_score=7.9,rhost=localhost,raddr=127.0.0.1,rport=/home/av-spam/tmp/spamd.sock,mid=<200512032245.j B3Mjo6a002765@www.linboogy.com>,autolearn=ham
Dec 3 17:46:05 www sendmail[2783]: jB3MjoEB002768: to=admin, delay=00:00:15, xdelay=00:00:07, mailer=local, pri=123900, dsn=2.0.0, stat=Sent
Dec 3 17:46:05 www spamd[2752]: prefork: child states: II

View User's Profile Visit User's Homepage View All Posts By User U2U Member
linboogy
Junior Member






Posts 7
Registered 10-7-2005
Location USA Cincinnati Ohio
Member Is Offline

Mood:

posted on 12-4-2005 at 03:27 PM Edit Post Reply With Quote
found the fix

This cured the problem
I added apache@localhost to
/etc/mail/access


Thanks for your help

View User's Profile Visit User's Homepage View All Posts By User U2U Member
brian
Super Administrator






Posts 3136
Registered 6-9-2003
Member Is Offline

Mood: happy go lucky

posted on 12-4-2005 at 07:58 PM Edit Post Reply With Quote
Thanks for the info, I will add that to my 2.6 CD ISO Image.
View User's Profile Visit User's Homepage View All Posts By User U2U Member
MasterK
Junior Member






Posts 20
Registered 12-8-2005
Member Is Offline

Mood:

posted on 12-9-2005 at 08:14 PM Edit Post Reply With Quote
never mind

I had a cname in the dns causing problems.
View User's Profile View All Posts By User U2U Member
brian
Super Administrator






Posts 3136
Registered 6-9-2003
Member Is Offline

Mood: happy go lucky

posted on 12-14-2005 at 04:01 AM Edit Post Reply With Quote
Just another fix I had seen on the BQ Mailing list


echo "/usr/sbin/sendmail -t -i -f admin" >> /etc/php.d/sendmail.ini
/etc/rc.d/init.d/httpd restart

View User's Profile Visit User's Homepage View All Posts By User U2U Member
amaru
Junior Member






Posts 4
Registered 1-19-2006
Member Is Offline

Mood:

posted on 4-26-2006 at 02:41 PM Edit Post Reply With Quote
I had to add the following to /etc/virtusertable :
apache@my.domain.name apache

View User's Profile View All Posts By User U2U Member
sussexbob
Junior Member






Posts 15
Registered 9-4-2006
Member Is Offline

Mood:

posted on 9-15-2006 at 08:25 AM Edit Post Reply With Quote
I had a problem when I installed Joomla (installed on the servers own domain) as it wanted to send out as apache@www.mydomain.tld. I tried all of the above with no luck.

Then I noticed in /etc/mail/virtusertable that vsites got installed with apache@www.myvsite.tld where the server domain didnt have this entry, so added apache@www.serverdomain.tld, but that didn't work either.

So I went and had a look at my trusty old 550 that runs Joomla and other scripts ok and noticed in /etc/mail/access that there were entries for relay by the first three octets of the server ip and the server domain.
such as:
# Cobalt Access Section Begin
nnn.nnn.nnn RELAY
myserverdomain.tld RELAY
# Cobalt Access Section End

I popped these in and all is now working. What do you think Brian?

View User's Profile View All Posts By User U2U Member

New Topic New Poll New Reply


go to top



Processed in 0.0392330 seconds, 19 queries