RE: Configuring Sendmail to use smart host



Who Is your ISP provieder ?
-----Original Message-----
From: ubuntu-users-bounces@xxxxxxxxxxxxxxxx
[mailto:ubuntu-users-bounces@xxxxxxxxxxxxxxxx]On Behalf Of Dave M G
Sent: Wednesday, July 04, 2007 10:06 AM
To: Ubuntu user technical support,not for general discussions
Subject: Configuring Sendmail to use smart host


Ubuntu Users,

I'm a web developer and not at all a sendmail administrator. But I find
I'm trying to set up my local LAMP server so that I can test email
functions from within my PHP scripts.

All I want to be able to do is send email from within PHP. My local LAMP
server is not serving to the web, it's just for local testing.

But to test email, I need to have SMTP set up so that it can send out to
the internet.

After much research and frustration, I've learned to do the following:

I need to install sendmail, and configure it so that it uses a "smart
host", which is the SMTP server of my ISP.

So...

In my /etc/php5/apache2/php.ini file, I have the following setting:

sendmail_path = /usr/sbin/sendmail

My /etc/mail/sendmail.mc file has:

FEATURE(`authinfo',`hash -o /etc/mail/authinfo.db')dnl
define(`SMART_HOST',`smtp.my.isp.com')
define(`SMTP_MAILER_ARGS', `TCP $h 587') - my ISP takes SMTP
connections at port 587

And I have a file called /etc/mail/authinfo.db which has in it:
AuthInfo:smtp.my.isp.com "U:mylogin@xxxxxxx" "P:password" "M:PLAIN"
AuthInfo: "mylogin@xxxxxxx" "P:password" "M:PLAIN"

I had to "hash" the authinfo.db file with the following command:
sudo makemap hash /etc/mail/authinfo < /etc/mail/authinfo

I also had to convert(?) the sendmail.mc file to a sendmail.cf file with
this command:
sudo m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

And then when all that was done, I restarted sendmail like so:
sudo /etc/init.d/sendmail restart

But it said:
sudo: cannot get working directory
Restarting Transport Agent: sendmailstart-stop-daemon: stat
/usr/sbin/sendmail-mta: No such file or directory (No such file or
directory)
/etc/init.d/sendmail: 1195: /usr/sbin/sendmail-msp: not found

What have I missed, am I doing something wrong, and, ultimately, how do
I get sendmail to use my ISP (with username, password, and port
settings) to send mail from my testing machine?

Thank you for any advice.

--
Dave M G
Ubuntu Feisty 7.04
Kernel 2.6.20-15-386

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: Sendmail - another newbie question
    ... >> Setup your mail agent so that your domain is the ISP domain and your ... >> account is the mail account given to you by your ISP. ... sendmail is a life's work. ...
    (comp.os.linux.networking)
  • Re: local mail delivery - how to remove myhost.localdomain?
    ... have my ISP defined as a SMART_HOST. ... From reading the Sendmail book, it looks like I have to write a S= ... * make your sendmail masquerade as different host ... How do I map the sender? ...
    (comp.mail.sendmail)
  • Re: esmtproutes and sendmail
    ... tell courier to send mail for specific adresses through my ISP. ... Changing to solaris I run sendmail. ... section about using mailertables, so let's say that for a test you ... or whatever is the name of your ISP mail server. ...
    (comp.mail.sendmail)
  • Re: How to optimally set up components for SOHO mail system.
    ... this then feed into the local IMAP server? ... protocols and then hands it off to your SMTP server (Sendmail or Postfix ... It can also handle cases where your ISP puts all the ... Does Evo use sendmail, or does it fetch from the ISP ...
    (Fedora)
  • Configuring Sendmail as a Client
    ... I'm trying to figure out the "right way" to set up sendmail on a my ... home network off of a consumer ISP. ... block dynamic customer ranges. ... sendmail to behave as a SMTP AUTH submission client in this way? ...
    (comp.mail.sendmail)