HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   Postfix, maildir, not virtual.. (http://www.howtoforge.com/forums/showthread.php?t=23522)

TheRudy 22nd May 2008 01:14

Postfix, maildir, not virtual..
 
Hey

Requesting help :)

I've set up a server that will host only 1 domain!! All other crap is set and now i want email also. I've installed postfix with courier (took procedure from Debian Etch perfect setup: http://www.howtoforge.com/perfect_setup_debian_etch_p5)

I did everything on that page. I know that is for virtual set up so i hope i didn't fuck up..

Now to the questions/problems

1. I've set up an account "root@domain.tld" and i logged in with root password for server :S but it logs in just fine! The problem is:
Code:

May 21 18:34:03 tmqserver courierpop3login: chdir Maildir: No such file or directory
Right, so i've read that maildir should be created when 1st email gets in but no matter how many emails i send, the error message is always the one above!

2. How do i remove root email and set up other email for 1 domain name?

Again, i do not want to use virtual setup since i'm hosting only 1 domain name that will be in use only by me..

This is my main.cf
Code:

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
myhostname = tmqserver.DOMAIN.TLD
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = tmqserver.DOMAIN.TLD, localhost.DOMAIN.TLD, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
home_mailbox = Maildir/


falko 22nd May 2008 12:27

Quote:

Originally Posted by TheRudy
Right, so i've read that maildir should be created when 1st email gets in but no matter how many emails i send, the error message is always the one above!

Usually root's emails are forwarded to postmaster. What's in /etc/aliases?

Quote:

Originally Posted by TheRudy
2. How do i remove root email and set up other email for 1 domain name?

This link might help you: http://www.howtoforge.com/forums/showthread.php?t=2

TheRudy 22nd May 2008 13:38

/etc/aliases
Code:

# See man 5 aliases for format
postmaster:    root

As for second, i think that link explains it all. Will give it a go..

TheRudy 22nd May 2008 15:47

Could it be that Courier has wrong permissions?

Code:

May 22 09:08:33 tmqserver courierpop3login: info: chdir(/home/info) failed!!
May 22 09:08:33 tmqserver courierpop3login: error: No such file or directory

/home/info DOES exist!

Since
Code:

useradd -d /home/sample_user -g users sample_user
doesn't create folder, i made it with mkdir and set chown info:users

Think this could be a problem?

TheRudy 22nd May 2008 16:45

Right, so now that i created Maildir folders with maildir something command, i get this error when i log in with email client:

Code:

courierpop3login: chdir Maildir: Permission denied
So, what permissions should there be set for Maildir and subdirs? I have chmod 700 set, but group and user?

TheRudy 22nd May 2008 16:51

Right, owner is set to account and group to "users"

Login now works without any errors! Hurray for me..

Still tho, sending email to this email account has no result. Nothing in the logs also... What could be a problem? Where to look?

TheRudy 22nd May 2008 17:02

Problem solved :)

Reason for mail not coming in was smtp not set in firewall :S

All works now.

Thanks falko ;)

falko 23rd May 2008 12:25

Quote:

Originally Posted by TheRudy
Since
Code:

useradd -d /home/sample_user -g users sample_user
doesn't create folder, i made it with mkdir and set chown info:users
?

Use
Code:

useradd -d /home/sample_user -m -g users sample_user
instead; the -m switch creates the homedir. :)

TheRudy 23rd May 2008 12:48

Yeah, found the -m option after everything was working :S


All times are GMT +2. The time now is 05:10.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.