July 22nd, 2003, 20:44
Coming into this week, I felt I was pretty comfortable with understanding mail, mail servers, terminology etc.
However, since i've been hammering away at setting up a mail server, I realized just how much I do not know and how much I have to learn. :)

So, my goal in this thread was to help me understand a few more concepts about mail and mail servers basically. As i've stated, i've setup our mail server using Postfix. Im also planning on setting up a mail-gateway running postfix as well. So let me ask a few questions here.

Reading through a lot of stuff lately, I realized I need to clear a few things up. I will post a few quotes from config files here just to make sure i'm correct.

# SMTP SERVER (INPUT) access control
# - do not allow free access to the amavisd SMTP port !!!
# when MTA is at the same host, use the following (one or the other or both):
#$inet_socket_bind = ''; # limit socket bind to loopback interface
# (default is '')
@inet_acl = qw( ); # allow SMTP access only from localhost IP
# (default is qw( ) )

Looking at this one, since this setup is going to be the actual mail server, I do not need to specify any specific email addresses correct? If anything, I should add something like:

[code:1:4666239159]@inet_acl = qw( 127/8 192.168/24);[/code:1:4666239159]

Which should only allow SMTP access from the loopback and my internal LAN range, correct? Should I uncomment inet_socket_bind ?

I would imagine there is a setting in postfix (main.cf) that I need to add to tell postfix to only allow access from certain IP's, correct?

I guess where im confused is the part where I configure one server as a mail-gateway and one as the actualy mail server. I get confused. :)

Anyone have any suggestions?

Time for that tobacco


July 22nd, 2003, 21:01
Yep. Made the necessary updates for postfix.

[code:1:89394531c2]mynetworks =,[/code:1:89394531c2]

Should only allow my network.

BTW, what are some recommended setup schemes for spam and viruses? For example, since im running a virus scanner and spamassassin, I need to create a useraccount that we will receive all of the email that is bounced.
Any suggestions? One account? Two accounts etc.

Then i'd like to setup mutt so I can log in and view all the lovely emails.

Thanks guys.


July 22nd, 2003, 22:07
just setup one catchall account, that works best.

July 23rd, 2003, 17:51
Moving along here.

I've been doing testing with my mail server.
I have a question about postfix and command line email usage.

Can you use the command line tools like 'sendmail' and 'mail' and 'mailx' with Postfix?

I'd like to do some testing with email from the command line and was not sure what postfix uses. Thought i'd ask here....


July 23rd, 2003, 19:34
Yes, all those commands work, provided you fully replaced sendmail with postfix.

July 24th, 2003, 15:48
Alright d00ds. Im having a so so day.
I need to configure POP on my server. I've looked at a couple, including qpopper, courier and a imap/pop RPM I can install on my server...

I'm reading up on the docs, but wanted to see if anyone here had any suggestions or recommendations on what they thought.

I'm closing in on finishing this bad boy up and then im on to my next project.

Thanks everyone. Looking forward to your reply.


July 24th, 2003, 15:58
Well for pop I've run a few servers.


All of them will get the job done. pop is easy to setup. Just install the rpm and uncomment the pop line in inetd.conf. I do like to run my pop servers as a daemon mainly because I just don't like inetd, all of the ones I listed above also have the ability to run as a daemon too. That's about it with pop. There's very little configuration with it. Hope That helps!

July 24th, 2003, 15:58
Why pop3? Just curious. pop is going the way of the dodo, imap is an awesome protocol.

As for pop servers, my only real experience is with qpopper which does work quite well. But I'm sure there are others here who might have more insight into a good pop server.

If you go imap, which you should, courier is the one.

July 24th, 2003, 16:05
If memory servers me correctly, if I decide to go with IMAP (I will need to bounce it off management too) I will need to do additional configurations with Postfix correct?

While im here, can someone explain the following:

mailman (not the guy who comes to your home :) )


July 24th, 2003, 16:08
the only additional configuration postfix requires for imap is the Maildir/ style delivery option to be set in the main.cf It's in my how-to.

I concur with minion, IMAP is a much much better protocol, and lends itself very well towards future grow and plans, like webmail, and ldap and virtual users tables like mysql. This is personal choice. pop is easy and an option to use to get up and running now, imap mnight take a little while longer, not much though.

July 24th, 2003, 16:09
does courrier imap not also install a pop protocol?

i believe it does..

July 24th, 2003, 16:40
Ok...just hammered away at management about this.

This is what they want:

They want them both. Yep, both. They like the idea of IMAP for the "Leaders" but want POP for the troops.

Sooo...I found some software:


That actually will install both. So, that looks to be what im going to do.

Anyone else have input?

I'm going to setup my email as IMAP. heheh!


July 24th, 2003, 16:51
They want them both. Yep, both. They like the idea of IMAP for the "Leaders" but want POP for the troops.

Huh? Is that supposed to make sense?

Anyway, it's a step in the right direction. Go courier, it supports both imap and pop even with maildir style delivery.

The only hiccup to imap is that if your crew hopes to use the insanely ugly package known as Outlook they'll be rather unhappy. Outlook and Eudora are absolutely brutal imap clients. On the other hand, netscape/mozilla and kmail are brilliant!

July 24th, 2003, 16:53
One thought. Plug them with going IMAP everywhere with this as your ammo:


The most kick ass webmail solution around. And, if you go IMAP then your people can check thier email at the office, at home or at some Net cafe and always see *exactly* the same email/mailboxes. A key plus to going IMAP.

July 24th, 2003, 20:05
Odd. I cannot dwnload the software for courier-imap. Site keeps timing out...


July 25th, 2003, 14:54
Alright d00ds. Im jamming today. Mail server seems to be working as it should. Setting up additional warnings and such through a config file. I still need to get a pop/imap thing working...found one that works, but not sure if I like it...seems to easy to install and get working.

Ok...here is a question. It is more of a matter of what do you email gurus out there suggest.

Today, im going to be adding all of our users to the mail server. About 40 of them.

My question is this: None of this users will need any type of shell access to this server. They will also not need any type of home directory to access as well.
With that in mind, do you recommend just setting up the users with a false shell and no home directory? Basically, just create the account and password?



July 25th, 2003, 15:19
umm your users will need a home directory thats where their mail is stored.. in ~/Maildir unless you configured it to do something else..

so they will need a homedir.. but you can give them /sbin/nologin access.

July 25th, 2003, 15:28
Ahh yes. Forgot to mention. Well, now that I think about it, I may have to do some reworking.

Originally, all email was going to go into /var/spool/mail/<user> (I made this partition quite large).

However, if im going to be using imap, I will need to configure maildir. I'm guessing, that I can configure all email to be held in the /var/spool/mail partition...

Hmm...me thinking.

BTW, anyone here setup amavis-new?


July 25th, 2003, 15:55
BTW, anyone here setup amavis-new?



July 25th, 2003, 15:57
Hmm. Let me ask a couple of generic type email questions here. It goes in relation with what im trying to setup. Im trying to make things more clear for me. :)

When we talk about 'envelope addresses', im confused on exactly what it is referring to...can someone explain that to me?
From what i gathered, I think it is this:

" it is the address that a mailer will automatcally use to return a bounce if it can't deliver the message", for example.

Let me put a few snips in here from my amavisd.conf file:

[code:1:fd70cd96c8]# where to send ADMIN VIRUS NOTIFICATIONS (should be a fully qualified address)
# - the administrator address may be a simple fixed e-mail address (a scalar),
# or may depend on the SENDER address (e.g. its domain), in which case
# a ref to a hash table can be specified (specify lower-cased keys,
# dot is a catchall, see README.lookups).
# Empty or undef lookup disables virus admin notifications.

#$virus_admin = &quot;mailadmin\@$mydomain&quot;;
# $virus_admin = undef; # do not send virus admin notifications (default)
# $virus_admin = {'not.example.com' =&gt; '', '.' =&gt; 'virusalert@example.com'};
$virus_admin = 'virus-admin@SErocksdahouse.com';

So in this case above, all virus alerts will be sent to virus-admin@SErocksdahouse.com, correct?

Another quick snip:

[code:1:fd70cd96c8]# whom notification reports are sent from (ENVELOPE SENDER);
# may be a null reverse path, or a fully qualified address:
# (admin and recip sender addresses default to $mailfrom
# for compatibility, which in turn defaults to undef (empty) )
# If using strings in double quotes, don't forget to quote @, i.e. \@
$mailfrom_notify_admin = &quot;mailadmin\@$mydomain&quot;;
$mailfrom_notify_recip = &quot;mailadmin\@$mydomain&quot;;

This is where im slightly confused. (probably from reading it to much.)

This make sense to anyone?

Thanks guys.

Tarballed, who goes back to the grind stone

July 25th, 2003, 17:23
Hey guys...check out this bounce message I received. See if someone can help me figure out what the problem could be:

[code:1:d45803dd69]Date: Fri, 25 Jul 2003 12:41:24 -0700
From: Mail Delivery Subsystem &lt;MAILER-DAEMON&gt;
To: &lt;spam.police@ironchef.com&gt;
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

The original message was received at Fri, 25 Jul 2003 12:41:23 -0700
from CMC_pier_point [209.126.xxx.xxx] (may be forged)

----- The following addresses had permanent fatal errors -----
(expanded from: &lt;spamadmin@ironchef.com&gt;)

----- Transcript of session follows -----
553 5.1.2 jwilliams@ironchef..com... Invalid host name
Reporting-MTA: dns; r4-sd010.curaswa.com
Received-From-MTA: DNS; CMC_pier_point
Arrival-Date: Fri, 25 Jul 2003 12:41:23 -0700[/code:1:d45803dd69]

Ok...where im looking is where it has jwilliams@ironchef..com
It has two ".." in there. I've been trying to figure out wat this could be.

Anyone have any iideas?


July 25th, 2003, 19:19
Ok...this is really starting to piss me off. I cant figure out what is causing the problem.

I'm really annoyed right now and need a ton of beer to settle my nerves.

I've gone through everything that I can: tailed the logs, checked my configs and I cant seem to track down wth the problem is.

This is like the final part to this server and I cant figure out this problem.


Venting my frustations!


July 25th, 2003, 19:32
when you undertook this process did you set up each part 1 by 1 and test each one as you went along? if so then narrowing it down should be a lot easier..

July 25th, 2003, 20:14
Hmmm....weird stuff be happening.

[code:1:25bd04455c]Date: Fri, 25 Jul 2003 15:19:33 -0700
From: Mail Delivery Subsystem &lt;MAILER-DAEMON&gt;
To: &lt;spam.police@example.com&gt;
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

The original message was received at Fri, 25 Jul 2003 15:19:33 -0700
from CMC_pier_point [209.126.xxx.xx] (may be forged)

----- The following addresses had permanent fatal errors -----
(expanded from: &lt;spamadmin@example.com&gt;)

----- Transcript of session follows -----
553 5.1.2 jwilliams@example..com... Invalid host name[/code:1:25bd04455c]

Ok. That was the error message that I was originally receiving. It was bouncing. This is where it gets funky.

I added an alias to my email address: spam.police
I went ahead and sent it again, and now it works.

Bizarre. But I still need to find out wth the problem is when I dont have the alias in.


July 30th, 2003, 14:45
Ok..figured out my last part.

Really quick question. What is the general agreement here on which mail list manager is recommended? Majordomo?

Anyone have any suggestions for a mailing list manager?



July 30th, 2003, 15:12
I think majordomo is probably the most commonly used.
Of course, like all things mail server related, I dont have much experience with it.... :roll:

July 30th, 2003, 15:20


August 6th, 2003, 18:43
Working with mailman right now.
Funny, I dont find a whole lot of docs on the web site.
Im in the process of downloading it and testing it out.

Any tips for using it? I just need to create a few basic lists for my intranet right now. Nothing fancy for now.



August 6th, 2003, 19:15
Any tips for using it? I just need to create a few basic lists for my intranet right now. Nothing fancy for now..

I think the only tip I can give for working with mailman is patience. I seem to remember it took me a while to get it going and establish the lists I wanted. I don't remember it being very hard to get going mind you, just tedious and time consuming. It's really good though.

August 6th, 2003, 21:00
I see that mailman requires apache.
Hmm, I was not planning on putting up apache on my mail server. I guess im starting to like my servers more streamlined and without as much crud as I can avoid...

But it's worth it eh?
I guess it could come in handy for intranet use.