Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Sendmail Options?

Reply
Thread Tools

Sendmail Options?

 
 
Gary Mayor
Guest
Posts: n/a
 
      05-30-2004
Hi,
I'm having a problem with sendmail not always sending emails. When
someone registers I want sendmail to send a registration email to the
user but this only works 50% of the time. So the only thing I can think
of is my sendmail options. Here's the line I use to send emails,

my $sendmail = "/usr/sbin/sendmail -oi -t";

Is there anything wrong with that line. What other options can I use on
there to hopefully improve the reliability of email sending.

Thanks

Gary
 
Reply With Quote
 
 
 
 
Walter Roberson
Guest
Posts: n/a
 
      05-30-2004
In article <c9c953$99v$(E-Mail Removed)>,
Gary Mayor <(E-Mail Removed)> wrote:
:I'm having a problem with sendmail not always sending emails. When
:someone registers I want sendmail to send a registration email to the
:user but this only works 50% of the time. So the only thing I can think
f is my sendmail options. Here's the line I use to send emails,

:my $sendmail = "/usr/sbin/sendmail -oi -t";

:Is there anything wrong with that line. What other options can I use on
:there to hopefully improve the reliability of email sending.

This isn't a sendmail newsgroup.

sendmail -oi -t is pretty traditional for sending out email when
the destination is to be read from the message itself. The -oi option
tells it to ignore input lines that contain a single period ('dot'),
which would otherwise indicate end-of-file.

You haven't given us any information about what happens the other 50%
of the time when you try to send out email. Does it just disappear?
Does it get stuck in the queue? Does it go to the wrong recipient?


I think we can get a clue from the one line of code that you included.
You used double-quotes for the string even though no variables were
being interpolated and no escape sequences were being used. You could
instead have used:

my $sendmail = '/usr/sbin/sendmail -oi -t';

This gives us the hint that you probably aren't being careful about
interpolation, and gives us the hint that you probably don't have
taint checking turned on. You might not even be using strictures --
do you have use strict; and use warnings; turned on?

--
I've been working on a kernel
All the livelong night.
I've been working on a kernel
And it still won't work quite right. -- J. Benson & J. Doll
 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      05-30-2004
Gary Mayor wrote:
> I'm having a problem with sendmail not always sending emails. When
> someone registers I want sendmail to send a registration email to
> the user but this only works 50% of the time.


I believe that the behaviour is caused by the sendmail configuration
rather than your Perl program. Study the documentation about the mail
server configuration or ask the server administrator for help.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

 
Reply With Quote
 
Tintin
Guest
Posts: n/a
 
      05-30-2004

"Gary Mayor" <(E-Mail Removed)> wrote in message
news:c9c953$99v$(E-Mail Removed)...
> Hi,
> I'm having a problem with sendmail not always sending emails. When
> someone registers I want sendmail to send a registration email to the
> user but this only works 50% of the time. So the only thing I can think
> of is my sendmail options. Here's the line I use to send emails,
>
> my $sendmail = "/usr/sbin/sendmail -oi -t";
>
> Is there anything wrong with that line. What other options can I use on
> there to hopefully improve the reliability of email sending.


comp.mail.sendmail is thataway.........->



 
Reply With Quote
 
Gary Mayor
Guest
Posts: n/a
 
      05-30-2004
Walter Roberson wrote:
> In article <c9c953$99v$(E-Mail Removed)>,
> Gary Mayor <(E-Mail Removed)> wrote:
> :I'm having a problem with sendmail not always sending emails. When
> :someone registers I want sendmail to send a registration email to the
> :user but this only works 50% of the time. So the only thing I can think
> f is my sendmail options. Here's the line I use to send emails,
>
> :my $sendmail = "/usr/sbin/sendmail -oi -t";
>
> :Is there anything wrong with that line. What other options can I use on
> :there to hopefully improve the reliability of email sending.
>
> This isn't a sendmail newsgroup.
>
> sendmail -oi -t is pretty traditional for sending out email when
> the destination is to be read from the message itself. The -oi option
> tells it to ignore input lines that contain a single period ('dot'),
> which would otherwise indicate end-of-file.
>
> You haven't given us any information about what happens the other 50%
> of the time when you try to send out email. Does it just disappear?
> Does it get stuck in the queue? Does it go to the wrong recipient?
>
>
> I think we can get a clue from the one line of code that you included.
> You used double-quotes for the string even though no variables were
> being interpolated and no escape sequences were being used. You could
> instead have used:
>
> my $sendmail = '/usr/sbin/sendmail -oi -t';
>
> This gives us the hint that you probably aren't being careful about
> interpolation, and gives us the hint that you probably don't have
> taint checking turned on. You might not even be using strictures --
> do you have use strict; and use warnings; turned on?
>


Hi,
The emails just disappear looked in the logs and there's nothing giving
a clue, just says sent.

Nope no tainting, strict or warnings turned on will do so now.

Thanks
 
Reply With Quote
 
Keith Keller
Guest
Posts: n/a
 
      05-30-2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2004-05-30, Gary Mayor <(E-Mail Removed)> wrote:

> my $sendmail = "/usr/sbin/sendmail -oi -t";
>
> Is there anything wrong with that line. What other options can I use on
> there to hopefully improve the reliability of email sending.


The Net::SMTP module is more Perlish and more portable.

- --keith

- --
http://www.velocityreviews.com/forums/(E-Mail Removed)-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAuh0ghVcNCxZ5ID8RAmLnAJ4wcLh2+pGESiTlNehhmC 4rfY9lHQCffYxf
2mgCUl4rrHthvVNv+t63F0o=
=Y+VJ
-----END PGP SIGNATURE-----
 
Reply With Quote
 
Juha Laiho
Guest
Posts: n/a
 
      05-30-2004
Gary Mayor <(E-Mail Removed)> said:
>Walter Roberson wrote:
>> In article <c9c953$99v$(E-Mail Removed)>,
>> Gary Mayor <(E-Mail Removed)> wrote:
>> :I'm having a problem with sendmail not always sending emails.

....
>> :Here's the line I use to send emails,
>>
>> :my $sendmail = "/usr/sbin/sendmail -oi -t";

....
Well, the line you quoted does not send mail; it declares a variable
called '$sendmail' and initialises it to the given value. Apparently
later in the code you give that variable to "system" or some other
all that will actually execute sendmail.

>The emails just disappear looked in the logs and there's nothing giving
>a clue, just says sent.


Says "sent" where? In the logs? If the log says "sent", then look for
detail saying "relay=some.host.name". So, for example here's a log entry
of a message I sent to myself:
sendmail[4467]: i4UHhbF9004465: to=<(E-Mail Removed)>, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30318, relay=mta.inet.fi. [192.89.123.210], dsn=2.0.0, stat=Sent (Message received: (E-Mail Removed) s-int)

So, says that it has been delivered using mailer 'relay', and has been
accepted for delivery by mta.inet.fi. In addition, mta.inet.fi admins
could find out more info about this message with the id listed at the
end of the line (2004...).

If there is a line like this in your maillog, then the message is delivered
out of your machine, but may of course have been filtered by some other
machine on the way - antispam and virus scanning software are rather
commonplace nowadays.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
 
Reply With Quote
 
Gary Mayor
Guest
Posts: n/a
 
      05-30-2004
Thanks Juha finnaly some useful feedback


Juha Laiho wrote:
> Gary Mayor <(E-Mail Removed)> said:
>
>>Walter Roberson wrote:
>>
>>>In article <c9c953$99v$(E-Mail Removed)>,
>>>Gary Mayor <(E-Mail Removed)> wrote:
>>>:I'm having a problem with sendmail not always sending emails.

>
> ...
>
>>>:Here's the line I use to send emails,
>>>
>>>:my $sendmail = "/usr/sbin/sendmail -oi -t";

>
> ...
> Well, the line you quoted does not send mail; it declares a variable
> called '$sendmail' and initialises it to the given value. Apparently
> later in the code you give that variable to "system" or some other
> all that will actually execute sendmail.
>
>
>>The emails just disappear looked in the logs and there's nothing giving
>>a clue, just says sent.

>
>
> Says "sent" where? In the logs? If the log says "sent", then look for
> detail saying "relay=some.host.name". So, for example here's a log entry
> of a message I sent to myself:
> sendmail[4467]: i4UHhbF9004465: to=<(E-Mail Removed)>, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30318, relay=mta.inet.fi. [192.89.123.210], dsn=2.0.0, stat=Sent (Message received: (E-Mail Removed) s-int)
>
> So, says that it has been delivered using mailer 'relay', and has been
> accepted for delivery by mta.inet.fi. In addition, mta.inet.fi admins
> could find out more info about this message with the id listed at the
> end of the line (2004...).
>
> If there is a line like this in your maillog, then the message is delivered
> out of your machine, but may of course have been filtered by some other
> machine on the way - antispam and virus scanning software are rather
> commonplace nowadays.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [sendmail,perl] How to catch a mailer error [perl script as sendmail.cf mailer] Andrzej Adam Filip Perl 0 03-31-2008 09:24 PM
Unable to load tag handler class "com.cj.smtp.Sendmail" for tag "send:Sendmail" sugapablo Java 0 09-21-2007 01:41 PM
Mozilla and Sendmail cm Firefox 1 07-18-2005 03:05 AM
Sendmail problem jim Perl 4 10-30-2003 06:29 PM
Chomp not working properly with Sendmail Aaron Powell Perl 0 07-24-2003 02:24 PM



Advertisments