View previous topic :: View next topic |
Author |
Message |
strider3700 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 10 Apr 2003 Posts: 94
|
Posted: Thu Sep 02, 2004 12:19 am Post subject: problem installing postfix |
|
|
here at work we have a suse box running sendmail that has been hacked. Long story involving a lack of maintenance and a 2 year old kernel and sshd. Emerge -u world would have gone a long ways...
Anyways the person originally in charge of maintaining the box is no longer here and no one really knows anything about the mail server. The task of fixing this little issue has fallen on my desk.
I've managed to move the majority of the services from the suse box to my gentoo box but I'm at a total loss on how to get the mail server going. Looking at how I think it works on the old box we have the following
Each person recieving email has an account on the box. They are Main1, Main2... Main17
those accounts are aliased to the persons name for Email address's (Main13 is mine so jamie@.... is my addess) that is setup in /etc/mail/aliases
We do have a domain name (to be refered to as BusinessName.com from here on out) so my addess is Jamie@businessname.com which shows up in main13's account automagically somehow.
After that we use pop to get the mail off of that account and only do it from the local network 192.168.1.
I've been following the virtual mailhosting system with postfix guide at
http://www.gentoo.org/doc/en/virt-mail-howto.xml in an attempt to recreate this.
so here is what I've done
Set the useflags to have mysql, pam-mysql, imap, maildir, sasl, ssl and my old standard flags
did emerge postfix. It installed a few other packages including mysql.
I set up /etc/postfix/main.cf same as the howto says
I set up master.cf as I was told
I figured I'd start small with the aliases so I just added root:jamie@businessname.com ( the jamie account already exists) to /etc/mail/aliases
I ran /usr/bin/newaliases
I started postfix /etc/init.d/postfix start
as root I run good old pine
send a mail to root@businessname.com
nothing shows up in root inbox which makes sence, it's been forwarded. Check jamie's inbox. Nothing there. Send mail from jamie to root and to jamie, nothing.
Now I'm at a loss of what to do. the walkthrough just says make sure it's working before continuing.
I think it may have something to do with my hostname, domain name or dnsdomainname that I've setup
hostname = internal2 ( old box was internal)
domainname = (none) (old box had none)
dnsdomainname = businessname.com (old box is businessname.com)
/etc/hosts has
127.0.0.1 localhost
192.168.1.104 internal2.businessname.com internal2
So what should I look for? Where are postfix logs storred? they aren't in /var/logs that I can see.
Thanks for any help, I'm far from an admin but you do what the boss tells you.
Jamie |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
thompsonmike Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/6th Day/movie_the_6th_day_adam_gibson.gif)
Joined: 19 Jan 2004 Posts: 275 Location: Bath UK
|
Posted: Thu Sep 02, 2004 1:56 am Post subject: |
|
|
Postfix will log to /var/log/messages if you are running syslog-ng
I would'nt go with the Postfix virtual guide if all users have a account on the server, just do it the old fashioned way!
Install Postfix, and use Fetchmail to pull the mail off the pop server, and here as reference is my main.cf, which you should be able to use as a guide. Note I have a Authenticated SMTP server, hence the settings at the end.
Dont forget to set aliases for root, et all, and aliases only need to be set for other address that dont exist as accounts, but need to be forwarded to real accounts. (Such as postmaster etc)
Code: |
#soft_bounce = no
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
#default_privs = nobody
myhostname = mail.thompsonmike.co.uk
#myhostname = virtual.domain.tld
#mydomain = domain.tld
myorigin = $mydomain
#
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
#proxy_interfaces =
#proxy_interfaces = 1.2.3.4
#mydestination = $myhostname, localhost.$mydomain
#mydestination = $myhostname, localhost.$mydomain $mydomain
mydestination = $myhostname, localhost.$mydomain, $mydomain, orion.thompsonmike.co.uk
# mail.$mydomain, www.$mydomain, ftp.$mydomain
#
#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
local_recipient_maps =
unknown_local_recipient_reject_code = 550
#unknown_local_recipient_reject_code = 450
#
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host
mynetworks = 192.168.1.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
#relay_domains = $mydestination
#relayhost = $mydomain
#relayhost = gateway.my.domain
#relayhost = uucphost
relayhost = auth.smtp.oneandone.co.uk
#relay_recipient_maps = hash:/etc/postfix/relay_recipients
#in_flow_delay = 1s
#alias_maps = dbm:/etc/aliases
#alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
#alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
#recipient_delimiter = +
#home_mailbox = Mailbox
home_mailbox = .maildir/
#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"
#mailbox_transport = lmtp:unix:/file/name
#mailbox_transport = cyrus
#fallback_transport = lmtp:unix:/file/name
#fallback_transport = cyrus
#fallback_transport =
#luser_relay = $user@other.host
#luser_relay = $local@other.host
#luser_relay = admin+$local
header_checks = regexp:/etc/postfix/header_checks
#fast_flush_domains = $relay_domains
#fast_flush_domains =
#smtpd_banner = $myhostname ESMTP $mail_name
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 20
debug_peer_level = 2
#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.0.19/sample
readme_directory = /usr/share/doc/postfix-2.0.19/readme
default_destination_concurrency_limit = 2
alias_database = hash:/etc/mail/aliases
local_destination_concurrency_limit = 2
alias_maps = hash:/etc/mail/aliases
home_mailbox = .maildir/
#
# 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/saslpass
smtp_sasl_security_options =
smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain =
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
content_filter=smtp-amavis:[127.0.0.1]:10024
##UNCOMMENT WHEN AMAVISD WORKING TO SATISFACTION!
|
_________________ Thanks
Michael.. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
strider3700 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 10 Apr 2003 Posts: 94
|
Posted: Thu Sep 02, 2004 3:26 pm Post subject: |
|
|
Thanks
I'll give it a try in the next couple of hours and tell you how it goes. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
strider3700 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 10 Apr 2003 Posts: 94
|
Posted: Thu Sep 02, 2004 7:34 pm Post subject: |
|
|
I've located the logs. I use metalog so it's in /var/log/mail/current
Right away I see a few fatal errors
Code: | Sep 2 12:24:56 [local] fatal: execvp /usr/bin/procmail: No such file or directory
|
This is true it's not there. Do I need to emerge procmail for this to work?
next error is
Code: | Sep 2 12:24:57 [postfix/local] 67F931B81A: to=<jamie:businessname.com@businessname.com>, orig_to=<root@internal2.businessname.com>, relay=local, delay=0, status=bounced (unknown user: "jamie:businessname.com")
|
the email was sent from root@internal2.businessname.com to jamie@businessname.com which is a valid email if the email ever went outside of the localhosts.
Any help? thanks guys
Jamie |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
strider3700 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 10 Apr 2003 Posts: 94
|
Posted: Thu Sep 02, 2004 9:33 pm Post subject: |
|
|
Ok I emerged procmail. That error went away and I was left with the user not found problem.
I changed my alias from root:jamie@businessname.com to jamie
It now says everything was delivered correctly. However pine shows nothing there. When I poked around I found that pine was looking in ~/Mailbox but procmail put it in .mail I think this is a bit of config then I'm on to the next problem I'm sure |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
thompsonmike Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/6th Day/movie_the_6th_day_adam_gibson.gif)
Joined: 19 Jan 2004 Posts: 275 Location: Bath UK
|
Posted: Fri Sep 03, 2004 1:28 am Post subject: |
|
|
Correct, Postfix and Procmail use maildir by default, and your pine is using mbox.
Just configure pine to use maildir format not mailbox and all will be fine. _________________ Thanks
Michael.. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|