Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: PERL Sendmail Problem

by Corion (Patriarch)
on Jan 30, 2017 at 20:05 UTC ( [id://1180636]=note: print w/replies, xml ) Need Help??


in reply to PERL Sendmail Problem

No, /usr/lib/sendmail is a program that either is installed on your host (and then you can maybe use it to send mail) or not (then you cannot use it for sending mail either).

Maybe you want to use MIME::Lite, which (despite its message at the top) can and does send mail very well? It can use a sendmail binary or talk directly via SMTP to the receiving host.

Replies are listed 'Best First'.
Re^2: PERL Sendmail Problem
by Anonymous Monk on Jan 30, 2017 at 22:10 UTC

    When I look up MIME::Lite I find this WAIT! message:

    MIME::Lite is not recommended by its current maintainer. There are a number of alternatives, like Email::MIME or MIME::Entity and Email::Sender, which you should probably use instead. MIME::Lite continues to accrue weird bug reports, and it is not receiving a large amount of refactoring due to the availability of better alternatives. Please consider using something else.

    I've had limited success with Mail::Mailer so I'll try to use that in my script. In the body, tried to esc a single quote (by '') and use \n for end of line, but these didn't work. Looks like simple text with CRLF works instead of \n. Haven't figured out how to use single quote -

Re^2: PERL Sendmail Problem
by Anonymous Monk on Jan 30, 2017 at 21:20 UTC

    Thanks. It seems that sendmail module has been removed by my host. Are you saying that you don't see anything wrong with the script?
    Is there a security problem or PERL update that has resulted in obsoleting sendmail? I don't want to accuse my host of removing sendmail unless there is a good reason.

      To clarify, sendmail is not a part of Perl , nor is it distributed with perl. It is a separate application. Your script just happened to be accessing the separate application. Any obsolescence in sendmail would come from itself, not from Perl. That said, a quick web search for "security concerns with sendmail" shows that many people consider sendmail insecure.

      Rather than "accusing" your host, I would phrase it something like,

      /usr/lib/sendmail used to exist on the server, but now it seems to not exist (in that, I cannot execute it at that path, and I cannot find it elsewhere). Was its remove a deliberate action, or an oversight during an upgrade? If it's deliberate, what alternatives do you support?

      But before sending that message, I'd suggest looking for sendmail, and see whether it's really missing, or whether they just removed your permissions to execute it, or whether they moved it.

      And really, the best solution, rather than pestering your host, would be to follow corion's advice

      You can find out where sendmail is, information about it including whether you have permission to run it, and similar information about /usr/lib/sendmail, with commands like these:

      $ which sendmail /usr/sbin/sendmail $ ls -l /usr/sbin/sendmail -rwxr-xr-x 1 root wheel 243824 Jan 13 18:14 /usr/sbin/sendmail $ ls -l /usr/lib/sendmail ls: cannot access '/usr/lib/sendmail': No such file or directory

      You can get similar information by writing a script that uses the file test operators.

      — Ken

      It seems that sendmail module has been removed by my host. ... I don't want to accuse my host of removing sendmail unless there is a good reason.

      If the module is not there any more, it would seem to be reason enough to say it's been removed. ;-)


      Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1180636]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-23 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found