[maybe OT] postfix alternative (was: Re: How do I configure sendmail?)

2007-10-17 Thread Amarendra Godbole
On 10/17/07, Sunnz <[EMAIL PROTECTED]> wrote:
> Thanks for all the help, well I am probably just going to start out
> fresh by installing 4.2-release... so after booted up, I should:
>
> 0. Check the /etc/services and make sure smtp-ssl 465/tcp is defined.
> 1. add the cyrus-sasl package
> 2. re-compile sendmail with -DSASL (add WANT_SMTPAUTH= yes in /etc/mk.conf)
> 3. set up up SMTP AUTH with sendmail
> client (AuthInfo option in sendmail, and setting the smarthost entry
> in sendmail.cf)
>
> My ISP doesn't support standard STARTTLS in port 25... only smtp-ssl.
> (in fact they have blocked port 25, but can unblock it at request.)
>
> And thanks for web interface suggestions like webmin! I however like
> to at least give this a fair go in the hopes of that I can actually
> learn to manage a Unix box.
[...]

IMHO, there are better (read: smart) ways to manage a *nix box, than
to configure sendmail. One alternative you could look at is "postfix".
I recently configured postfix, and find it to be pretty simple than
sendmail. Here is how:
1. Add postfix-sasl2 from packages
2. Add cyrus-sasl from packages
3. Configure main.cf (of postfix) with smarthost and sasl info:
8<
relayhost = smtp.server.com

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous, noplaintext
smtp_sasl_mechanism_filter = login, ntlm
8<
Adjust the security options, and mechanism filter values according to
your local settings (postfix has good documentation on it).
4. Create /etc/postfix/sasl_passwd with the following info:
smtp.server.com user:pass
5. Chmod the sasl_passwd file, as it contains your password
root# chmod 600 /etc/postfix/sasl_passwd
6. create sasl_passwd.db from sasl_passwd
root# postmap hash:/etc/postfix/sasl_passwd
7. add the following entries to /etc/rc.conf.local (create
rc.conf.local if it does not exist)
sendmail_flags="-bd"
syslogd_flags="-a /var/spool/postfix/dev/log"
8. restart syslogd
9. start postfix
root# postfix start

If all goes well, postfix should be able to deliver your emails to the
world. Well, and in half the time needed to configure sendmail
(actually, not really configure, *understand* and configure sendmail).

-Amarendra



Re: How do I configure sendmail?

2007-10-17 Thread Sunnz
Thanks for all the help, well I am probably just going to start out
fresh by installing 4.2-release... so after booted up, I should:

0. Check the /etc/services and make sure smtp-ssl 465/tcp is defined.
1. add the cyrus-sasl package
2. re-compile sendmail with -DSASL (add WANT_SMTPAUTH= yes in /etc/mk.conf)
3. set up up SMTP AUTH with sendmail
client (AuthInfo option in sendmail, and setting the smarthost entry
in sendmail.cf)

My ISP doesn't support standard STARTTLS in port 25... only smtp-ssl.
(in fact they have blocked port 25, but can unblock it at request.)

And thanks for web interface suggestions like webmin! I however like
to at least give this a fair go in the hopes of that I can actually
learn to manage a Unix box.


-- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0



Re: How do I configure sendmail?

2007-10-16 Thread L. V. Lammert
On Tue, 16 Oct 2007, Douglas A. Tutty wrote:

> On Tue, Oct 16, 2007 at 11:21:36PM +0530, Amarendra Godbole wrote:
> > On 10/16/07, Aaron W. Hsu <[EMAIL PROTECTED]> wrote:
> > > > 2007/10/16, Sunnz <[EMAIL PROTECTED]>:
> > > > > Hi, I have read the man pages of afterboot, sendmail, and also looked
> > > > > at /usr/share/sendmail/README. I also have tried to google, and are
> > > > > now confused then ever.
> > > >
>
MUCH MUCH simpler process - install Webmin (www.webmin.com). We use it
here for all Sendmail admin.

We have not used any of the Sendmail SSL components, however.

Lee



Re: How do I configure sendmail?

2007-10-16 Thread Douglas A. Tutty
On Tue, Oct 16, 2007 at 11:21:36PM +0530, Amarendra Godbole wrote:
> On 10/16/07, Aaron W. Hsu <[EMAIL PROTECTED]> wrote:
> > > 2007/10/16, Sunnz <[EMAIL PROTECTED]>:
> > > > Hi, I have read the man pages of afterboot, sendmail, and also looked
> > > > at /usr/share/sendmail/README. I also have tried to google, and are
> > > > now confused then ever.
> > >
 
> OpenBSD's sendmail is not compiled with the SASL option enabled -
> which means, to do an SMTP AUTH with SASL -
> 1. add the cyrus-sasl package
> 2. re-compile sendmail with -DSASL (add WANT_SMTPAUTH= yes in /etc/mk.conf)
> 3. follow a standard tutorial on setting up SMTP AUTH with sendmail
> client (AuthInfo option in sendmail, and setting the smarthost entry
> in sendmail.cf)
> 
> Hopefully, sendmail should be able to authenticate itself against your
> smtp server now. I say hopefully, because, with sendmail, it always
> takes me more than one try to get things working (or maybe I am too
> dumb! :-))
> 
> A quick googling turned up the following link which may be useful:
> http://www.dsrw.org/~dlg/sysadmin/sendmail/
> A friend of mine has written another useful document on setting
> sendmail as a client with smtp auth:
> http://www.hserus.net/wiki/index.php/Sendmail

Wouldn't it be easier to just install exim?  Does the exim packaged for
OpenBSD do this out of the box?  FWIW it does on Debian.

Doug.



Re: How do I configure sendmail?

2007-10-16 Thread Amarendra Godbole
On 10/16/07, Aaron W. Hsu <[EMAIL PROTECTED]> wrote:
> > Date: Tue, 16 Oct 2007 17:17:36 +0200
> > From: "=?ISO-8859-1?Q?Samuel_Mo=F1ux?=" <[EMAIL PROTECTED]>
> > Subject: Re: How do I configure sendmail?
> >
> > 2007/10/16, Sunnz <[EMAIL PROTECTED]>:
> > > Hi, I have read the man pages of afterboot, sendmail, and also looked
> > > at /usr/share/sendmail/README. I also have tried to google, and are
> > > now confused then ever.
> >
> > Look at "Providing SMTP AUTH Data when sendmail acts as Client"
> > section in that file. I think its all what you need.
>
> Are you sure that this is everything he needs? From my experience with
> OpenBSD's Sendmail configuration, he needs SASL to authenticate to his
> smtps server. Normally, this would be a simple, compiled in option on
> most sendmails, and then, he could follow the instructions in the README
> file for setting up his configuration. (BTW, Sunnz, there are some good
> tutorials dedicated to just this if you don't understand the file format
> of the access file.)
>
> However, when I tried to do this at first, with my SASL enabled
> Slackware mail server, I ran into trouble. For some reason, my OpenBSD
> sendmail did not have the capacity to authenticate using SASL and normal
> SMTP AUTH. I was led to believe that this was the way sendmail was
> compiled on OpenBSD, and that I would need to recompile sendmail with
> new options to get the needed SMTP AUTH functionality. Is this true?
[...]

OpenBSD's sendmail is not compiled with the SASL option enabled -
which means, to do an SMTP AUTH with SASL -
1. add the cyrus-sasl package
2. re-compile sendmail with -DSASL (add WANT_SMTPAUTH= yes in /etc/mk.conf)
3. follow a standard tutorial on setting up SMTP AUTH with sendmail
client (AuthInfo option in sendmail, and setting the smarthost entry
in sendmail.cf)

Hopefully, sendmail should be able to authenticate itself against your
smtp server now. I say hopefully, because, with sendmail, it always
takes me more than one try to get things working (or maybe I am too
dumb! :-))

A quick googling turned up the following link which may be useful:
http://www.dsrw.org/~dlg/sysadmin/sendmail/
A friend of mine has written another useful document on setting
sendmail as a client with smtp auth:
http://www.hserus.net/wiki/index.php/Sendmail

-Amarendra



Re: How do I configure sendmail?

2007-10-16 Thread Aaron W. Hsu
Sunnz,

> So does sendmail supports smtp over ssl? When I restart sendmail I got
> something like:

> 554 5.3.5 /etc/mail/localhost.cf: line 239: service "smtps" unknown 

Did you check whether that service is actually defined in /etc/services? I 
don't know if sendmail uses that file, but I would expect it to use it for 
something like this.

-- 
((name "Aaron Hsu")
 (email/xmpp "[EMAIL PROTECTED]")
 (phone "703-597-7656")
 (site "http://www.aaronhsu.com";))

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: How do I configure sendmail?

2007-10-16 Thread Tor Houghton
On Wed, Oct 17, 2007 at 02:16:15AM +1000, Sunnz wrote:
> Ohh thanks for the tip.
> 
> So does sendmail supports smtp over ssl? When I restart sendmail I got
> something like:
> 
> 554 5.3.5 /etc/mail/localhost.cf: line 239: service "smtps" unknown
> 
> And in that line I've got:
> 
> # SMTP client options
> 
> O ClientPortOptions=Family=inet6, Address=::
> O ClientPortOptions=Family=inet, Address=0.0.0.0
> O ClientPortOptions=Port=smtps, Name=MTA
> 

You could change smtps to 465, or you could change it to smtp-ssl or similar
if this exists in your /etc/services file:

smtp-ssl465/tcp # SMTP over SSL/TLS

Tor



Re: How do I configure sendmail?

2007-10-16 Thread Aaron W. Hsu
> Date: Tue, 16 Oct 2007 17:17:36 +0200
> From: "=?ISO-8859-1?Q?Samuel_Mo=F1ux?=" <[EMAIL PROTECTED]>
> Subject: Re: How do I configure sendmail?
> 
> 2007/10/16, Sunnz <[EMAIL PROTECTED]>:
> > Hi, I have read the man pages of afterboot, sendmail, and also looked
> > at /usr/share/sendmail/README. I also have tried to google, and are
> > now confused then ever.
> 
> Look at "Providing SMTP AUTH Data when sendmail acts as Client"
> section in that file. I think its all what you need.

Are you sure that this is everything he needs? From my experience with
OpenBSD's Sendmail configuration, he needs SASL to authenticate to his
smtps server. Normally, this would be a simple, compiled in option on
most sendmails, and then, he could follow the instructions in the README
file for setting up his configuration. (BTW, Sunnz, there are some good
tutorials dedicated to just this if you don't understand the file format
of the access file.)

However, when I tried to do this at first, with my SASL enabled
Slackware mail server, I ran into trouble. For some reason, my OpenBSD
sendmail did not have the capacity to authenticate using SASL and normal
SMTP AUTH. I was led to believe that this was the way sendmail was
compiled on OpenBSD, and that I would need to recompile sendmail with
new options to get the needed SMTP AUTH functionality. Is this true?

In the end, I solved the problem by adding pure STARTTLS based
certificate authentication on my server and added my client's certs to
the list of allowable relayers. I like this way of working, but this
also means that Sunnz can't use this model, because he doesn't have
access to the configuration on his ISP's servers, obviously.

-- 
((name "Aaron Hsu")
 (email/xmpp "[EMAIL PROTECTED]")
 (phone "703-597-7656")
 (site "http://www.aaronhsu.com";))

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: How do I configure sendmail?

2007-10-16 Thread Samuel Moñux
2007/10/16, Sunnz <[EMAIL PROTECTED]>:
> Ohh thanks for the tip.
>
> So does sendmail supports smtp over ssl? When I restart sendmail I got
> something like:

Honestly, don't know. I thought the main problem was authenticating to
the relay, not doing smtp over ssl (you ISP doesn't support standard
STARTTLS in port 25?). Look at comp.mail.sendmail archive.

Best regards,
Samuel



Re: How do I configure sendmail?

2007-10-16 Thread Sunnz
Ohh thanks for the tip.

So does sendmail supports smtp over ssl? When I restart sendmail I got
something like:

554 5.3.5 /etc/mail/localhost.cf: line 239: service "smtps" unknown

And in that line I've got:

# SMTP client options

O ClientPortOptions=Family=inet6, Address=::
O ClientPortOptions=Family=inet, Address=0.0.0.0
O ClientPortOptions=Port=smtps, Name=MTA

I think I have done something seriously wrong here...

2007/10/17, Samuel MoC1ux <[EMAIL PROTECTED]>:
> 2007/10/16, Sunnz <[EMAIL PROTECTED]>:
> > Hi, I have read the man pages of afterboot, sendmail, and also looked
> > at /usr/share/sendmail/README. I also have tried to google, and are
> > now confused then ever.
> >
>
> Look at "Providing SMTP AUTH Data when sendmail acts as Client"
> section in that file. I think its all what you need.
>
> Best regards.
> Samuel
>
>


-- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0



Re: How do I configure sendmail?

2007-10-16 Thread Samuel Moñux
2007/10/16, Sunnz <[EMAIL PROTECTED]>:
> Hi, I have read the man pages of afterboot, sendmail, and also looked
> at /usr/share/sendmail/README. I also have tried to google, and are
> now confused then ever.
>

Look at "Providing SMTP AUTH Data when sendmail acts as Client"
section in that file. I think its all what you need.

Best regards.
Samuel



How do I configure sendmail?

2007-10-16 Thread Sunnz
Hi, I have read the man pages of afterboot, sendmail, and also looked
at /usr/share/sendmail/README. I also have tried to google, and are
now confused then ever.

Here's what I have 4.0-stable of OpenBSD, and my ISP provides a smtps
(smtp over ssl on port 465 server to send e-mails, generally I could
just use any graphics e-mail client, type in the address and port
number of the ISP's mail server, enter my username and password, and
ready to send mails.

I want to have my OpenBSD's sendmail to do this as well, which I
believe setting a relay server... am I terribly wrong? I am not
worrying about getting OpenBSD to act as a smtps server yet, just
letting its local users to send e-mails to the outside world at this
stage.

Is there any man pages or web pages that explained how to go about
this that I have missed?

Thanks.

-- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0