Results 1 to 2 of 2
I've spent a few days trying to get Postfix to work correctly, and I'm close to giving up. I went from having a regular webhost who did everything via cPanel ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-08-2007 #1
- Join Date
- Aug 2007
Postfix+Spamassassin+Courier IMAP questions...I have no idea what I'm doing.
1 Server with 1 IP
4 Domains (each w/ associated unix login)
Everything in DNS appears to be fine. Each domain has a cname of mail.whatverdomain.com (mail.domain1.com, mail.domain2.net, etc)
I want mail delivered to /home/~user/Mail/ folder
env (using etc/profile) has "MAIL=/home/$USER/Mail" set up
Postfix is set to deliver to "Mail/" in the home directory
My issues arise with mapping(s):
Delivery: canonical or virtual mappings? I bounce between /etc/postfix/virtual and /etc/postfix/canonical to no avail.
Sending: I want each domain to be able to send messages without the From being rewritten to the primary domain. At the same time, I don't want to be a mail relay.
Transport mapping: Should I define domain1 :[mail.domain1.com] for each domain in /etc/postfix/transport?
I just need the basics for a good main.cf file that will achieve my goal of each domain getting mail in its appropriate mailbox when its sent from outside.
I CAN send from the local machine (using webmin) to the outside test address. However I just replied to those messages and they aren't showing up.
I have issues with courier-imap but I just want to tackle the Postfix problem first, then figure out why every time I telnet (domain1.com 143) and login to IMAP..it immediately boots me out the instant I log in successfully.
Any help would be appreciated. A skeletonized example main.cf would be a godsend.
EDIT: about the mailboxes themselves: Will they be automatically created on initial message delivery or do I create them myself first? Do I create them as the user, or as root? What chmod/chgrp do I use on them?
EDIT2: Here is my main.cf
#soft_bounce = no queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix mail_owner = postfix #default_privs = nobody myhostname = mail.comfortablydumb.net mydomain = comfortablydumb.net myorigin = $mydomain inet_interfaces = $myhostname, localhost #inet_interfaces = localhost mydestination = $myhostname, localhost.$mydomain, localhost, comfortablydumb.net local_recipient_maps = unix:passwd.byname $alias_maps unknown_local_recipient_reject_code = 550 #mynetworks_style = class #mynetworks_style = subnet #mynetworks_style = host mynetworks = 188.8.131.52/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 = [mailserver.isp.tld] #relayhost = uucphost #relayhost = [an.ip.add.ress] #relay_recipient_maps = hash:/etc/postfix/relay_recipients #in_flow_delay = 1s alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases home_mailbox = Mail/ mail_spool_directory = /var/spool/mail debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail.postfix newaliases_path = /usr/bin/newaliases.postfix mailq_path = /usr/bin/mailq.postfix setgid_group = postdrop html_directory = no manpage_directory = /usr/share/man sample_directory = /usr/share/doc/postfix-2.2.10/samples readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES # ---------------------------------------------------- # My additions # ---------------------------------------------------- #mailbox_command = /usr/bin/procmail -Y -a $HOME smtpd_client_restrictions = permit_mynetworks, reject smtpd_helo_restrictions = reject_unknown_helo_hostname smtpd_sender_restrictions = reject_unknown_sender_domain smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination smtpd_data_restrictions = reject_unauth_pipelining smtpd_end_of_data_restrictions = check_policy_service unix:private/policy virtual_mailbox_domains = hash:/etc/postfix/virtual virtual_mailbox_base = /home/$USER virtual_mailbox_maps = hash:/etc/postfix/virtual virtual_uid_maps = hash:/usr/local/postfix/etc/virtual_uids virtual_gid_maps = hash:/usr/local/postfix/etc/virtual_gids virtual_alias_maps = hash:/etc/postfix/virtual
- 08-09-2007 #2
- Join Date
- Aug 2007
nevermind. i've fixed it.