Gossamer Forum
Quote Reply
Sendmail exited with....
Ok, I *have* search the forums for this question, BUT all the threads just tell you to change to SMTP! This isn't an option for me.

Anyone got any ideas what this means?

Sendmail exited with an unknown exit status: 1

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Sendmail exited with.... In reply to
Found this on sendmail.org... anyone wanna translate for me? LOL!

Quote:
Subject: Q4.13 -- What does "unknown mailer error 1" mean?
Date: September 24, 1998
In general, sendmail does not perform final delivery of messages, but relies on a local delivery agent instead. Such an agent, mail.local, is provided with the sendmail distribution. Any such agent that sendmail invokes for message delivery, as specified on an M line in sendmail.cf, must exit with code 0 (success), or one of the failure codes noted in src/sysexits.h. These generally run in the range 64 - 78, so 1 would be out of range, and lead to sendmail generating the above error.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Sendmail exited with.... In reply to
It basically means that sendmail failed and exited with an unkown error.

The fix? No idea as we don't know what the error is. Is there an error log, or maybe a -v output option to see what sendmail is doing? How about some code ...

- wil
Quote Reply
Re: [Wil] Sendmail exited with.... In reply to
Thanks for the reply. I may get Alex to look into this for me (its on my GT server). The weird thing is, that the same sendmail routine is used througout the script, and 2 out of the 5 options do not produce an error. The code is;

Code:
######################################################################
# routine that sends out emails. No pouint having the same code 4 or 5
# times, so just pass variables to this one...
sub send_mail_out {

my $type = $_[0]; # e.g. defs
my $output = $_[1]; # debug info returned, for sending out...
my ($ftp_details,@ftp_array);
my $admin_folder = $CFG->{admin_root_path};

# see if we can load the FTP log ... grabbed previously from STDERR.
open (READIT, "<$admin_folder/ftp.log");
@ftp_array = <READIT>;
close(READIT);
$ftp_details = join("\n",@ftp_array);

my $subject = "\"$type\" Backup Report...";
my $message = qq|Hi, the "$type" backup reported the following output;

------------------------------------------
SCRIPT DEBUG (Should see at least 4 or 5 messages here)

$output
------------------------------------------
FTP OUTPUT (if any)...

$ftp_details
------------------------------------------

Please check the above message, to make sure no errors were reported.
If they were, please look into them.

Thanks

LSQL Auto_Backup Script
|;

require GT::Mail;
$GT::Mail::error ||= ''; # Silence -w
GT::Mail->send (
smtp => $CFG->{db_smtp_server},
sendmail => $CFG->{db_mail_path},
from => $CFG->{db_admin_email},
subject => $subject,
to => $Admin_Email,
msg => $message,
debug => $Links::DEBUG
) or Links::fatal ("Unable to send mail: $GT::Mail::error");

}

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Sendmail exited with.... In reply to
Thanks for the code. What about sample input? A message, including all headers? Any funny characters or character sets in there, or a runaway line, maybe.

- wil
Quote Reply
Re: [Wil] Sendmail exited with.... In reply to
Not that I know of. I'm not actually getting any errors now. Very odd!

What was that -v option you were talking about?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Wil] Sendmail exited with.... In reply to
Ok, seems to be down to this;

Code:
# see if we can load the FTP log ... grabbed previously from STDERR.
open (READIT, "<$admin_folder/ftp.log");
@ftp_array = <READIT>;
close(READIT);
$ftp_details = join("\n",@ftp_array);

If I comment this bit out, the emails send ok. Must be some bad charachters or something in the resport.. mmm. I'l lhave a look at it, and see what looks like its causing the problem.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Sendmail exited with.... In reply to
Very odd.

Quote:
Net::FTP: Net::FTP(2.64)

Net::FTP: Exporter(5.562)

Net::FTP: Net::Cmd(2.21)

Net::FTP: IO::Socket::INET(1.25)

Net::FTP: IO::Socket(1.26)

Net::FTP: IO::Handle(1.21)



Net::FTP=GLOB(0x841d838)<<< 220-=(<*>)=-.:. (( Welcome to PureFTPd 1.0.12 )) .:.-=(<*>)=-

Net::FTP=GLOB(0x841d838)<<< 220-You are user number 2 of 50 allowed.

Net::FTP=GLOB(0x841d838)<<< 220-Local time is now 06:36 and the load is 1.24. Server port: 21.

Net::FTP=GLOB(0x841d838)<<< 220 You will be disconnected after 15 minutes of inactivity.

Net::FTP=GLOB(0x841d838)>>> user linkssql

Net::FTP=GLOB(0x841d838)<<< 331 User linkssql OK. Password required

Net::FTP=GLOB(0x841d838)>>> PASS ....

Net::FTP=GLOB(0x841d838)<<< 230-User linkssql has group access to: linkssql

Net::FTP=GLOB(0x841d838)<<< 230 OK. Current restricted directory is /

Net::FTP=GLOB(0x841d838)>>> TYPE I

Net::FTP=GLOB(0x841d838)<<< 200 TYPE is now 8-bit binary

Net::FTP=GLOB(0x841d838)>>> MKD templates

Net::FTP=GLOB(0x841d838)<<< 550 Can't create directory: File exists

Net::FTP=GLOB(0x841d838)>>> CWD templates

Net::FTP=GLOB(0x841d838)<<< 250 OK. Current directory is /templates

Net::FTP=GLOB(0x841d838)>>> MKD 1

Net::FTP=GLOB(0x841d838)<<< 550 Can't create directory: File exists

Net::FTP=GLOB(0x841d838)>>> CWD 1

Net::FTP=GLOB(0x841d838)<<< 250 OK. Current directory is /templates/1

Net::FTP=GLOB(0x841d838)>>> PORT 64,69,64,30,234,2

Net::FTP=GLOB(0x841d838)<<< 200 PORT command successful

Net::FTP=GLOB(0x841d838)>>> STOR templates.tar

Net::FTP=GLOB(0x841d838)<<< 150 Connecting to port 59906

Net::FTP=GLOB(0x841d838)<<< 226-34042.1 Mbytes free disk space

Net::FTP=GLOB(0x841d838)<<< 226-File successfully transferred

Net::FTP=GLOB(0x841d838)<<< 226 3.607 seconds (measured here), 0.71 Mbytes per second

Net::FTP=GLOB(0x841d838)>>> QUIT

Net::FTP=GLOB(0x841d838)<<< 221-Goodbye. You uploaded 2640 and downloaded 0 kbytes.

Net::FTP=GLOB(0x841d838)<<< 221 Logout - CPU time spent: 0.070 seconds.

Can you see any charachters in there that would cause a problem? I don't see any pipes or anything... Unsure

Cheeers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Wil] Sendmail exited with.... In reply to
Wil, what was that -v option you were talking about? I tried searching for it here, but couldn't find it. You refering to something like;

sendmail -v

?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Sendmail exited with.... In reply to
Nah, just looking for a verbose (usually a -v flag) output option. This flag usually tells you exactly what the program is tryning to do. Usually the opposite of -s (silent, default).

- wil
Quote Reply
Re: [Wil] Sendmail exited with.... In reply to
There is no log in /var/log/sendmail or somewhere, though?

- wil
Quote Reply
Re: [Wil] Sendmail exited with.... In reply to
There is a /var/log/maillog , but when I try to view it, I get a permission denied error :( I'm not able to access it completly as root. I am going in as 'admin', but not su -, cos GT don't give that info out (for obvious reasons).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Sendmail exited with.... In reply to
This is very strange. As far as I can see, sendmail should never exit with exit status 1 -- only with 0, 100, or 111 status (by the way, this isn't sendmail, but rather qmail's sendmail wrapper).

If you can send me a stepy by step way to reproduce this, I can take a look for you.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Sendmail exited with.... In reply to
This problem seems to have stopped now. Not sure why it was doing it. Imade some changes, and tested it after each change. Maybe mod_perl was caching the script?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Sendmail exited with.... In reply to
In Reply To:
This problem seems to have stopped now. Not sure why it was doing it. Imade some changes, and tested it after each change. Maybe mod_perl was caching the script?

Cheers




I am having this issue, my send mail path seems to be correct. I am going to continue to search for the answer.
My sendmail path is correct, so I am a little confused. My admin email is also setup correctly :(

/usr/lib/sendmail

This also happens when I try to use sendmail in anyway. This happened on the first attempt at sending mail as well, so I don't know if it would have been cached.

Last edited by:

avery: Dec 29, 2006, 1:34 AM
Quote Reply
Re: [avery] Sendmail exited with.... In reply to
Sorry for the double post, but it won't let me edit again. I also would like to say that sendmail is working in other apps we use.
Also when I disable sending email, then things work. Just no emails.

Thank you.
Avery

Last edited by:

avery: Dec 29, 2006, 2:26 AM
Quote Reply
Re: [avery] Sendmail exited with.... In reply to
One more bit of info, mod_perl is not enabled on the server.