HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Setup mailaccount (http://www.howtoforge.com/forums/showthread.php?t=2)

mike 19th April 2005 16:23

Setup mailaccount
 
Hi,

I have followed the SuSE 9.2 server "The Perfect Setup".

Now how do I create a mailaccount using courier imap?

Michael

falko 19th April 2005 16:27

First you have to tell Postfix to deliver emails to a user's Maildir:

Code:

postconf -e 'home_mailbox = Maildir/'
postconf -e 'mailbox_command ='
/etc/init.d/postfix restart

Then you have to create a system user and a password:

Code:

useradd -d /home/sample_user -g users sample_user
passwd sample_user

Then run

Code:

postconf -e 'virtual_maps = hash:/etc/postfix/virtusertable'
postconf -e 'mydestination = /etc/postfix/local-host-names'

/etc/postfix/local-host-names should contain all domains that you want to accept emails for, e.g.:

Code:

localhost
your.server.name
localhost.your.server.name
example.com
yourdomain.com

/etc/postfix/virtusertable looks like this:

Code:

info@yourdomain.com  sample_user
thomas@example.com  sample_user
webmaster@yourdomain.com  sample_user

Emails for info@yourdomain.com, thomas@example.com and webmaster@yourdomain.com will now arrive in the mailbox of sample_user.

Everytime you change /etc/postfix/virtusertable you have to run the following command:

Code:

postmap /etc/postfix/virtusertable
Now restart Postfix:

Code:

/etc/init.d/postfix restart
and you're done! :)

mike 20th April 2005 11:08

Thanks Falko! It is working... :)

Michael

johnnynine 20th August 2007 22:17

What's the difference between using /etc/postfix/virtusertable and /etc/aliases?

falko 21st August 2007 17:37

/etc/aliases maps the mails for existing system users to another system user. virtusertable defines the email addresses that belong to a system user.

johnnynine 21st August 2007 19:09

Quote:

Originally Posted by falko
/etc/aliases maps the mails for existing system users to another system user. virtusertable defines the email addresses that belong to a system user.

I have my /etc/aliases file mapping non-existing system users to a system user and it works fine, so I don't quite understand?

Happy 23rd August 2007 18:13

postfix config
 
etc/postfix/local-host-names

the above file contains no info and when I try and open it says new file. So do I create files that do not exist. as I ran the command prior to the above. I used webmin to add users. Again I am using just local or system users no virtual users

Thanks
Happy

falko 24th August 2007 22:12

Quote:

Originally Posted by Happy
etc/postfix/local-host-names

the above file contains no info and when I try and open it says new file. So do I create files that do not exist.

Yes, you must create that file.

johnnynine 25th August 2007 08:32

Quote:

Originally Posted by falko
/etc/aliases maps the mails for existing system users to another system user. virtusertable defines the email addresses that belong to a system user.

Ok, I reread this and it makes sense... too many late night linux installs.

Happy 28th August 2007 04:19

email setup
 
info@yourdomain.com sample_user
thomas@example.com sample_user
webmaster@yourdomain.com sample_user

Since my users are accepting mail for only one domain-WOuld it look like this
thomas@example.com jthomas
thad@example.com sthad
thompson@example.com jthompson

So what I am saying is if I have only one domain and the user is accepting mail for that single domain, does each user need to be put in like above?

Thanks
Happy


All times are GMT +2. The time now is 16:21.

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