Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 28th August 2007, 19:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Quote:
Originally Posted by Happy
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
Yes, that's right.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Sponsored Links
  #12  
Old 29th August 2007, 03:04
Happy Happy is offline
Member
 
Join Date: Jun 2007
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default error when trying to create the following file

I am trying to create the folloing file

vi /etc/postfix/local-host-names
localhost
your.server.name
localhost.your.server.name
your.domain

after entering the info above

I go to write the info and get the following error

"etc/postfix/local-host-names"
"etc/postfix/local-host-names" E212: Can't open file for writing
Hit ENTER or type command to continue
Get a 127 Shell error as well
Any ideas on why I can not create this file

Thanks
Happy
Reply With Quote
  #13  
Old 29th August 2007, 19:05
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Make sure you use /etc/postfix/local-host-names and not etc/postfix/local-host-names.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #14  
Old 29th August 2007, 23:05
Happy Happy is offline
Member
 
Join Date: Jun 2007
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default error when trying to create the following file

Quote:
Originally Posted by falko
Make sure you use /etc/postfix/local-host-names and not etc/postfix/local-host-names.
The . was the problem-not sure how it got in there

Thanks
Happy
Reply With Quote
  #15  
Old 29th August 2007, 23:36
Happy Happy is offline
Member
 
Join Date: Jun 2007
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating email accounts

Quote:
Originally Posted by falko
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!
Ok I orginally created the users mailboxes in webmin

and then created them in
/etc/postfix/virtusertable
when I ran /etc/init.d/postfix restart
I got a error/warning saying duplicate -
however the users remained in
/etc/postfix/virtusertable

Should I expect any issue
If not then I will begin testing as I am done except for doing some Spam catching/filtering

Happy
Reply With Quote
  #16  
Old 30th August 2007, 21:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

What's the exact error message? What's in /etc/postfix/main.cf?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #17  
Old 31st August 2007, 03:58
Happy Happy is offline
Member
 
Join Date: Jun 2007
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default error message

Again the users were created in webmin
Here is the error message I got

root@mail:~# postmap /etc/postfix/virtusertable
postmap: warning: /etc/postfix/virtusertable.db: duplicate entry: "sample.net"
postmap: warning: /etc/postfix/virtusertable.db: duplicate entry: "sample.net"
postmap: warning: /etc/postfix/virtusertable.db: duplicate entry: "sample.net"
is this not needed since I created the users in webmin or should I delete all users out of webmin and then create them manually?

I got the above waring/error when I added another user (I created the user in webmin first) and then added to the virtusertable
The following file exist but nothing is in it
/etc/postfix/main.cf

Thanks
Happy

Last edited by Happy; 31st August 2007 at 04:00.
Reply With Quote
  #18  
Old 1st September 2007, 20:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

What's in /etc/postfix/virtusertable? What's the output of
Code:
cat /etc/postfix/main.cf
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #19  
Old 2nd September 2007, 00:53
Happy Happy is offline
Member
 
Join Date: Jun 2007
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default output

Quote:
Originally Posted by falko
What's in /etc/postfix/virtusertable?
all my users email addresses are in the file

sample.com jsmith






What's the output of
Code:
cat /etc/postfix/main.cf
?
root@mail:~# vi /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
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

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.sample.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = /etc/postfix/local-host-names
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/
virtual_maps = hash:/etc/postfix/virtusertable

Happy
Reply With Quote
  #20  
Old 2nd September 2007, 20:12
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
 
Default

Do you have duplicates in /etc/postfix/virtusertable?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:12.


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