FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 11-08-2011, 06:25 PM
Rashkae
 
Default how to install postfix on my 11.10 box with everything else in place?

On 11/08/2011 11:02 AM, Robert P. J. Day wrote:

openly admitting i'm not an email admin expert, i have a running
11.04 system with email running nicely -- "fetchmail" to get my mail,
"alpine" as my reader and, underneath it all, postfix.

i want to finish moving everything from this current system to the
new one, and the last thing left to move is the ability to get and
send email.

i've copied over all of mail/, mbox, .addressbook*, .pinerc,
installed fetchmail and alpine, and all that's left to do is install
and configure postfix.

this *shouldn't* be hard since my .fetchmailrc and .pinerc files
pretty much configure everything i need to know, i just need to drop
in a basic postfix, correct? so given my fairly basic setup, when i
install postfix on the 11.10 system, which selection do i make:

No config
Internet Site
Internet with smarthost
Satellite system
Local only

as i read it, i want either choice 2 or 3 but i'm not sure which.
advice?

rday

The choice really only affects how e-mail is sent out from your system
to other hosts on the Internet. Most people now configure their e-mail
client program (alpine in your case) to connect to the smtp server of
their ISP, in which case, this won't matter at all. You could even
choose Local Only to make sure Postfix isn't trying to send out anything
internet side.


However, if you want postfix to be able to deliver messages to the
Internet, then you are correct, choice 2 or 3.


I still use choice 2, which means Postfix on my system takes care of
delivery. I do this because I'm a stubborn, anti-social old goat.
There are 3 problems with this:


1. Some ISP's block port 25, (as a means to block spam and e-mail
transmitted virii from originating from their network.). If that's the
case, that takes option 2 off the table entirely. Postfix can't deliver
e-mail through blocked port 25.


2. Some mail servers actively reject e-mail originating from ISP dynic
IP range. This was somewhat troublesome a year or 2 ago, though it
seems most blocklists no longer do this.


3. You have to be a bit more savvy about configuring some details of
postfix, such as a viable hostname. Leaving postfix identifying itself
as the default localhost.localdomain (or something similar,) while
perfectly legal in e-mail rfc, will get you blacklisted on spam RBL
blocklists.


Internet with Smarthost means postfix will hand off delivery of the
e-mail to the ISP smtp server. This should be straightforward if your
ISP accepts plain e-mail on their own port 25 for forwarding. However,
ISP's increasingly require some kind of authentication for outgoing
e-mail, even when it originates from one of their IP's (again, to combat
those evil self mailing virii.) If your ISP smtp server requires
authentication, then I'll have to defer to someone else for instructions
on how to configure it.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-08-2011, 07:25 PM
David Fletcher
 
Default how to install postfix on my 11.10 box with everything else in place?

On Tue, 2011-11-08 at 14:25 -0500, Rashkae wrote:
> ISP accepts plain e-mail on their own port 25 for forwarding. However,
> ISP's increasingly require some kind of authentication for outgoing
> e-mail, even when it originates from one of their IP's (again, to combat
> those evil self mailing virii.) If your ISP smtp server requires
> authentication, then I'll have to defer to someone else for instructions
> on how to configure it.
>
>

Here's the text from my notes on how to do it. I'm actually not using my
ISP's SMTP server - my ISP is Virgin Media and I'm using the
authenticated SMTP server at 1&1.

Set up a temporary hack machine with a fresh install of Ubuntu Server,
fix the IP address, set it as your outgoing mail server in your
kmail/evolution/whatever and fiddle with it until it works, then
transfer your working configuration to your production server.

You'll also have to set the relayhost parameter in main.cf

This text pinched from:-
http://postfix.state-of-mind.de/patrick.koetter/smtpauth/smtp_auth_mailservers.html

See also my pdf file of the web site.


16. SMTP Authentication for Mail servers
Prev Next
16. SMTP Authentication for Mail servers

SMTP AUTH for mail server is a feature that is often required to relay
mail through other mail servers. To enable SMTP AUTH for Postfix, acting
as mail client in this scenario, you need to do the following steps:

Procedure 10. Configure SMTP AUTH for mail servers

1. Provide a file, which will holds necessary information about
credentials
2. Configure Postfix to enable SMTP AUTH for the smtp daemon
3. Configure Postfix to use the file with the SASL credentials.

16.1. Add credentials to sasl_passwd

Postfix, acting as mail client in this scenario, will need to be able to

1. know when to provide a username and password
2. pick the right credentials when there is more than one mail server
who requires Postfix to SMTP AUTH

16.1.1. Enter credentials

These informations are layed down in /etc/postfix/sasl_passwd:

[root@mail postfix]# less /etc/postfix/sasl_passwd
# foo.com1 usernameassword2
# bar.com usernameassword

1 Using the hostname Postfix can identify the correct usernameassword
when there are multiple entries in sasl_passwd
2 usernameassword are entered in plaintext format. They are separated
by a single colon “:”

The mail server that we want to relay through in this example is
mail.my-isp.org; username is test and it's password is testpass. We
open /etc/postfix/sasl_passwd and add our credentials. When we are done
it looks like this:

[root@mail postfix]# cat /etc/postfix/sasl_passwd
mail.my-isp.org test:testpass

16.1.2. Secure sasl_passwd

As you have noticed, the credentials in sasl_passwd are entered
plaintext. That means that anybody who can open the file will be able to
read this sensitive information. Therefore we change ownership and
permission to root and r/w only.

[root@mail postfix]# chown root:root /etc/postfix/sasl_passwd && chmod
600 /etc/postfix/sasl_passwd

After these commands ownership and permissions read like this:

[root@mail postfix]# ls -all /etc/postfix/sasl_passwd
-rw------- 1 root root 79 Dec 30
23:50 /etc/postfix/sasl_passwd

[Note] Note

You wonder why Postfix running as user postfix can read this file?

Postfix will start as user root, read all files that need root
permission and switch to user postfix after that.
16.1.3. Create sasl_passwd DB file

Now that we have set correct ownership and permissions there is one more
thing to do. A plaintext file can't be read as fast as database. Postfix
requires this file to be a database, because it doesn't want to spend a
lot of time looking the credentials up when it needs to get it's job
done. We create a sasl_passwd.db with the help of postmap:

[root@mail postfix]# postmap hash:/etc/postfix/sasl_passwd

After that there will be a new file sasl_passwd.db in /etc/postfix/.

[root@mail postfix]# ls -all /etc/postfix/sasl_passwd.db
-rw------- 1 root root 12288 Mar 13
23:13 /etc/postfix/sasl_passwd.db

From the onwership and permissions you can see that postmap applied the
same as in the source file. That's it for sasl_passwd; you only need to
get back when the informations need an update.
[Note] Note

Don't forget to postmap the file, when you change credentials. Postfix
will tell you anyway by claiming that sasl_passwd is newer than
sasl_passwd.db in the maillog.
16.2. Enable SMTP AUTH

There are only three options that you must set to enable SMTP AUTH for
mail servers in Postfix.
[Note] Note

You can easily tell that these parameters are settings for the smtp
daemon. They all begin with smtp_.
16.2.1. Enable SMTP AUTH

The first thing we do is enabling SMTP AUTH for the smtp daemon. We open
main.cf and enter some documentation first and then we set
smtp_sasl_auth_enable to yes.

# SASL SUPPORT FOR SERVERS
#
# The following options set parameters needed by Postfix to enable
# Cyrus-SASL support for authentication of mail servers.
#
smtp_sasl_auth_enable = yes

16.2.2. Set path to sasl_passwd

Then we tell Postfix where to find sasl_passwd by adding
smtp_sasl_password_maps = hash:/path/to/sasl_passwd to the
configuration.

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

16.2.3. Set security options

Finally we set security options. In our scenario we will allow Postfix
to use anonymous and plaintext authentication. That's why we set the
paramter, but leave it empty:

smtp_sasl_security_options =

All settings together will give this listing in main.cf.

# SASL SUPPORT FOR SERVERS
#
# The following options set parameters needed by Postfix to enable
# Cyrus-SASL support for authentication of mail servers.
#
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =

16.2.4. Reload Postfix

All that you need to do now is to reload Postfix and you're ready to use
your ISPs mail server to relay mail.

[root@mail postfix]# postfix reload
postfix/postfix-script: refreshing the Postfix mail system

Have fun!



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-09-2011, 10:28 AM
"Robert P. J. Day"
 
Default how to install postfix on my 11.10 box with everything else in place?

On Tue, 8 Nov 2011, Rashkae wrote:

> On 11/08/2011 11:02 AM, Robert P. J. Day wrote:
> > openly admitting i'm not an email admin expert, i have a running
> > 11.04 system with email running nicely -- "fetchmail" to get my mail,
> > "alpine" as my reader and, underneath it all, postfix.
> >
> > i want to finish moving everything from this current system to the
> > new one, and the last thing left to move is the ability to get and
> > send email.
> >
> > i've copied over all of mail/, mbox, .addressbook*, .pinerc,
> > installed fetchmail and alpine, and all that's left to do is install
> > and configure postfix.
> >
> > this *shouldn't* be hard since my .fetchmailrc and .pinerc files
> > pretty much configure everything i need to know, i just need to drop
> > in a basic postfix, correct? so given my fairly basic setup, when i
> > install postfix on the 11.10 system, which selection do i make:
> >
> > No config
> > Internet Site
> > Internet with smarthost
> > Satellite system
> > Local only
> >
> > as i read it, i want either choice 2 or 3 but i'm not sure which.
> > advice?
> >
> > rday
> >
> The choice really only affects how e-mail is sent out from your
> system to other hosts on the Internet. Most people now configure
> their e-mail client program (alpine in your case) to connect to the
> smtp server of their ISP, in which case, this won't matter at all.
> You could even choose Local Only to make sure Postfix isn't trying
> to send out anything internet side.

that's what i thought after reading a bit more. currently, my
.pinerc file has an entry of the form:

smtp-server=mail.crashcourse.ca:[port]/user= ... etc etc ...

and since i use only alpine for now, it would seem that that's
everything i need. in this case, do i even need postfix installed? i
ask since it's installed on my current system but it would now seem i
never needed it in the first place.

if fetchmail is configured to know where to get my mail, and alpine
knows where to send it, i would think i'm pretty well set, no?

rday

--

================================================== ======================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
================================================== ======================

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-09-2011, 02:24 PM
Rashkae
 
Default how to install postfix on my 11.10 box with everything else in place?

On 11/09/2011 06:28 AM, Robert P. J. Day wrote:

On Tue, 8 Nov 2011, Rashkae wrote:


On 11/08/2011 11:02 AM, Robert P. J. Day wrote:

openly admitting i'm not an email admin expert, i have a running
11.04 system with email running nicely -- "fetchmail" to get my mail,
"alpine" as my reader and, underneath it all, postfix.

i want to finish moving everything from this current system to the
new one, and the last thing left to move is the ability to get and
send email.

i've copied over all of mail/, mbox, .addressbook*, .pinerc,
installed fetchmail and alpine, and all that's left to do is install
and configure postfix.

this *shouldn't* be hard since my .fetchmailrc and .pinerc files
pretty much configure everything i need to know, i just need to drop
in a basic postfix, correct? so given my fairly basic setup, when i
install postfix on the 11.10 system, which selection do i make:

No config
Internet Site
Internet with smarthost
Satellite system
Local only

as i read it, i want either choice 2 or 3 but i'm not sure which.
advice?

rday


The choice really only affects how e-mail is sent out from your
system to other hosts on the Internet. Most people now configure
their e-mail client program (alpine in your case) to connect to the
smtp server of their ISP, in which case, this won't matter at all.
You could even choose Local Only to make sure Postfix isn't trying
to send out anything internet side.

that's what i thought after reading a bit more. currently, my
.pinerc file has an entry of the form:

smtp-server=mail.crashcourse.ca:[port]/user= ... etc etc ...

and since i use only alpine for now, it would seem that that's
everything i need. in this case, do i even need postfix installed? i
ask since it's installed on my current system but it would now seem i
never needed it in the first place.

if fetchmail is configured to know where to get my mail, and alpine
knows where to send it, i would think i'm pretty well set, no?

rday



You might still need local mail delivery. You can configure a modern
system without it, but when you start adding more classic software,
there's a surprising amount of software that just expects sendmail to be
there to hand off delivery of messages to local user.


Fetchmail is a good example... I don't remember if it's possible to
configure Fetchmail to hand off delivery to some other process, but by
default, it just uses sendmail to drop the e-mail to the right file on
your system where alpine finds it. (postfix in this case, working as a
drop in sendmail replacement. And I think both using procmail to
actually write to the mail spool. I don't know how this got so
complicated for something that seems so simple.)





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

Thread Tools




All times are GMT. The time now is 10:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org