LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-23-2012, 03:45 PM   #1
cxc718
LQ Newbie
 
Registered: Jul 2012
Posts: 13

Rep: Reputation: Disabled
.forward file script wont run after moving to centos 6.2 and sendmail 8.14


I had a CentOS 5.4 x64 server, running sendmail-8.13.8-2.el5, which executed a perl script via the .forward file to parse incoming emails. This was working for me.

The server was recently replaced, and in the process, a fresh installation of CentOS 6.2 x64 and sendmail-8.14.4-8.el6.x86_64 was done. The relevant script was moved to the new server, the .forward file was created, along with symbolic link in /etc/smrsh.

It stopped working. My var/log/maillog shows the following:

(in the below log snip, for security concerns, I have replaced the actual server name with 'myservername', and the domainname with 'domainname.com', tvmailbot.pl is the name of the script that is supposed to run, and 'sender@domainname.com' is the system form which the email is being sent)

Jul 23 16:03:01 myservername sendmail[6366]: q6NK31HE006366: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32219, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q6NK31j8006386 Message accepted for delivery)

Jul 23 16:03:01 myservername sendmail[6387]: q6NK31j8006386: to=<root@myservername.domainname.com>, ctladdr=<root@myservername.domainname.com> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32714, dsn=2.0.0, stat=Sent

Jul 23 16:03:43 myservername sendmail[6447]: q6NK3hsJ006447: from=<sender@domainname.com>, size=1154, class=0, nrcpts=1, msgid=<20120723200343.4B1762A63BD@mail3.domainname.com>, proto=ESMTP, daemon=MTA, relay=barracuda.domainname.com

Jul 23 16:03:43 myservername smrsh: uid 500: attempt to use "tvmailbot.pl"

Jul 23 16:03:43 myservername sendmail[6448]: q6NK3hsJ006447: to=|/opt/scripts/tvmailbot.pl, ctladdr=<mailbot@myservername.domainname.com> (500/500), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=31345, dsn=5.0.0, stat=Service unavailable

Jul 23 16:03:43 myservername sendmail[6448]: q6NK3hsJ006447: q6NK3hsJ006448: DSN: Service unavailable


What I've found online so far, seems to suggest there is a dns issue with this error. I can't seem to find any dns issues in my situation. All systems resolve to the correct ip. My hosts file on the server running sendmail only contains localhost.localdomain localhost at 127.0.0.1

I can see that the .forward file is getting read, as the desired script is referenced.

I've compared my working centos 5.4 server to the nonworking centos 6.2 server, and outside of versions, I can't identify anything that is different. Any feedback on what else I could check would be appreciated.

Thanks
 
Old 07-24-2012, 08:36 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,
Quote:
I've compared my working centos 5.4 server to the nonworking centos 6.2 server, and outside of versions, I can't identify anything that is different.
Check if it's a SELinux permissions problem.
Also you can stop using .forward and use the aliases file to do your job. Add in /etc/aliases
Code:
mailbot: |/opt/scripts/tvmailbot.pl
and run the command
Code:
newaliases
Regards
 
1 members found this post helpful.
Old 07-24-2012, 11:12 AM   #3
cxc718
LQ Newbie
 
Registered: Jul 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Switching over to the aliases file instead of the .forward file resolved my issue. Thank you for the assistance.

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail Aliases: forward mail to script mikeshn Linux - Software 2 07-03-2010 08:22 PM
wine wont run on centos wreaking_havvik Linux - Software 3 04-29-2010 03:13 PM
Sendmail .forward file. asommer Linux - Software 4 04-27-2007 12:08 PM
Sendmail .forward file kaplan71 Linux - Software 2 10-13-2006 09:20 AM
.forward file with sendmail 8.12 RH9 mrobb Linux - Software 7 10-15-2003 02:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration