Sendmail Options?

Discussion in 'Perl Misc' started by Gary Mayor, May 30, 2004.

  1. Gary Mayor

    Gary Mayor Guest

    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
     
    Gary Mayor, May 30, 2004
    #1
    1. Advertising

  2. In article <c9c953$99v$>,
    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. So the only thing I can think
    :eek: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
     
    Walter Roberson, May 30, 2004
    #2
    1. Advertising

  3. 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
     
    Gunnar Hjalmarsson, May 30, 2004
    #3
  4. Gary Mayor

    Tintin Guest

    "Gary Mayor" <> wrote in message
    news:c9c953$99v$...
    > 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.........->
     
    Tintin, May 30, 2004
    #4
  5. Gary Mayor

    Gary Mayor Guest

    Walter Roberson wrote:
    > In article <c9c953$99v$>,
    > 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. So the only thing I can think
    > :eek: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
     
    Gary Mayor, May 30, 2004
    #5
  6. Gary Mayor

    Keith Keller Guest

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On 2004-05-30, Gary Mayor <> 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

    - --
    -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+pGESiTlNehhmC4rfY9lHQCffYxf
    2mgCUl4rrHthvVNv+t63F0o=
    =Y+VJ
    -----END PGP SIGNATURE-----
     
    Keith Keller, May 30, 2004
    #6
  7. Gary Mayor

    Juha Laiho Guest

    Gary Mayor <> said:
    >Walter Roberson wrote:
    >> In article <c9c953$99v$>,
    >> Gary Mayor <> 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=<>, 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: -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)
     
    Juha Laiho, May 30, 2004
    #7
  8. Gary Mayor

    Gary Mayor Guest

    Thanks Juha finnaly some useful feedback


    Juha Laiho wrote:
    > Gary Mayor <> said:
    >
    >>Walter Roberson wrote:
    >>
    >>>In article <c9c953$99v$>,
    >>>Gary Mayor <> 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=<>, 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: -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.
     
    Gary Mayor, May 30, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cliff  Martin
    Replies:
    1
    Views:
    3,068
    Larry Smith
    Jan 31, 2007
  2. sugapablo
    Replies:
    0
    Views:
    2,198
    sugapablo
    Sep 21, 2007
  3. jacksu
    Replies:
    0
    Views:
    532
    jacksu
    Oct 9, 2007
  4. Andrzej Adam Filip
    Replies:
    0
    Views:
    4,182
    Andrzej Adam Filip
    Mar 31, 2008
  5. Utkado
    Replies:
    2
    Views:
    2,202
Loading...

Share This Page