Current User: Guest Login Register
Please consider registering


Register? | Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

How to Add Thousands User Accounts in RHEL/CentOS 5

Reply to Post Add a New Topic
UserPost

4:55 am
April 5, 2010


bighorn

Member

posts 14

1st of all, i'm a newbie.

In Linux, new user accounts automatically receive mail accounts right???

I'm curious, for adding thousands user email accounts to my mailserver(postfix/dovecot), is it standard practice to add user account? Or maybe there are other method (such as db)??

I mean, if i want to register 10k mail account, i have to create 10k linux user accounts????

Thanks

8:27 pm
April 6, 2010


consultant

Admin

posts 353

Hi bighorn,

See the main page, their is an Active Directory/LDAP or MySQL option there. Good luck.

11:03 pm
May 30, 2010


bighorn

Member

posts 14

Post edited 3:05 am – May 31, 2010 by bighorn


Hi consultant,

 

Thanks for your reply.

I choose MySQL option and have install everything according to the manual.

MySQL,Postfix Admin,postfix, and everythings are in the same box.

I can login to MySQL email addresses via SquirrelMail.

 

My problem is, using MySQL email addresses, i can sent email out

but cannot received.But when using my system user names,

i can sent and receive email successfully.

When i test postfix configuration with cmd below:

postmap -q mydomain.com mysql:/etc/postfix/mysql-domains.cf

It doesn't echo my domain, but works fine for 
postmap -q johndoe@acme.com mysql:/etc/postfix/mysql-users.cf and
postmap -q john@acme.com mysql:/etc/postfix/mysql-aliases.cf

Looking at MySQL table domain, my domain already in the table.
What else could i miss? How can i troubleshoot and find the error log?

-----------------------------------my postfix/main.cf------------------------------------
virtual_mailbox_domains = mysql:/etc/postfix/mysql-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-users.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-aliases.cf
virtual_mailbox_base = /home/upay
virtual_uid_maps = static:504
virtual_gid_maps = static:505

smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
mynetworks = 127.0.0.0/8
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
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
myhostname = mydomain.com

home_mailbox = Maildir/
mailbox_command =

Really appreciate for your help

Thanks
Zul

9:51 am
May 31, 2010


consultant

Admin

posts 353

Hi Zul,

 

"When i test postfix configuration with cmd below:

postmap -q mydomain.com mysql:/etc/postfix/mysql-domains.cf

It doesn't echo my domain, but works fine for"

There's your problem. Double check your /etc/postfix/mysql-domains.cf file. There should be a misconfiguration there somewhere.

10:47 pm
May 31, 2010


bighorn

Member

posts 14

Post edited 4:25 am – June 1, 2010 by bighorn


Hi consultant,

 

I've check it and i think everythings are in order.User,host,dbname,password are all correct.

 

#———————-mysql-domains.cf—————————–

host = localhost

user = postfix

password = mypostfixpswd

dbname = postfix

table = domain

select_field = domain

where_field = domain

additional_conditions = and backupmx = '0' and active = '1'

———————————————————————–

#-----------------mysql-users.cf-------------------------------
host = localhost
user = postfix
password = mypostfixpswd
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
additional_conditions = and active = '1'
result_format = %sMaildir/
------------------------------------------------------------------
#--------------------mysql-aliases.cf--------------------------
host = localhost
user = postfix
password = mypostfixpswd
dbname = postfix
table = alias
select_field = goto
where_field = address
additional_conditions = and active = '1'
---------------------------------------------------------------
Looking at MySQL table domain, my domain already in the table and in active status with
 transport_field=virtual

Does I need to grant privileges for user in MySQL?

#------------------------dovecot-mysql.conf----------------------

driver = mysql
connect = host=localhost dbname=postfix user=postfix password=mypostfixpswd
default_pass_scheme = PLAIN
password_query = SELECT password FROM mailbox WHERE username = '%u'
--------------------------------------------------------------------------------

#---------------------dovecot.conf---------------------------------------------
protocols = pop3 pop3s imap imaps
mail_location = maildir:~/Maildir/
pop3_uidl_format = %08Xu%08Xv
imap_client_workarounds = delay-newmail outlook-idle netscape-eoh
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh

———————————————————————————-

#—————————-/usr/lib/sasl2/smtpd.conf——————

pwcheck_method: saslauthd

mech_list: plain login

————————————————————-

Hope this can help you to identify my error.

Thanks

Zul

8:16 am
June 2, 2010


consultant

Admin

posts 353

If you can't get mysql-domain.cf to work, for the mean time just specify the domains manually like this

virtual_mailbox_domains = example1.com, example2.com, example3.com

12:51 am
June 3, 2010


bighorn

Member

posts 14

Still no good, can't receive email after specify domain manually


Mail Delivery System Report Details:

This is the mail system at host mydomain.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<fauzi@mydomain.com>: unknown user: "fauzi"


Reporting-MTA: dns; mydomain.com
X-Postfix-Queue-ID: 52EED6F04C8
X-Postfix-Sender: rfc822; zulfadli@challengingprofile.com
Arrival-Date: Thu,  3 Jun 2010 12:24:55 +0800 (MYT)

Final-Recipient: rfc822; fauzi@mydomain.com
Original-Recipient: rfc822;fauzi@mydomain.com
Action: failed
Status: 5.1.1
Diagnostic-Code: X-Postfix; unknown user: "fauzi"

1:15 am
June 3, 2010


bighorn

Member

posts 14

I put again my complete conf for your perusal.

 

#——————-/etc/postfix/main.cf———————————————-

 

[root@plkn ~]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailbox_command =
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
myhostname = mydomain.com
mynetworks = 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql-aliases.cf
virtual_gid_maps = static:505
virtual_mailbox_base = /home/upay
virtual_mailbox_domains = mydomain.com
virtual_mailbox_maps = mysql:/etc/postfix/mysql-users.cf
virtual_uid_maps = static:504

————————————————————————————–

 

#——————-dovecot.conf—————————————

 

[root@plkn ~]# dovecot -n
# 1.0.7: /etc/dovecot.conf
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_location: maildir:~/Maildir
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh
imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh
imap_client_workarounds(pop3): outlook-idle
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
  username_format: %Lu
  passdb:
    driver: pam
  passdb:
    driver: sql
    args: /etc/dovecot-mysql.conf
  userdb:
    driver: passwd
  userdb:
    driver: static
    args: uid=504 gid=505 home=/home/upay/%d/%n

6:25 am
June 3, 2010


consultant

Admin

posts 353

The below line is wrong.

myhostname = mydomain.com

Thus Postfix is using local system accounts instead of virtual accounts after replacing the variable in the line below

mydestination = $myhostname, localhost.$mydomain, localhost

12:10 am
August 9, 2010


bighorn

Member

posts 14

consultant…..where r u dear…need help to ans my noob question…

 

Thanks

6:02 am
November 24, 2010


peeaarkey

Member

posts 4

Hi expert,

I  am trying to install a mail server on my own.

I have installed postfix,dovecot and sasl.

1,How to test all these are all woring fine

2.I need to create a email ids how can i do it.

3.What is aliases-explain it.

4.What are virtual domains.

 

Pl reply to clarify these doubts.

thanx in advance.waiting for u r reply soon ————

Reply to Post

Reply to Topic:
How to Add Thousands User Accounts in RHEL/CentOS 5

Guest Name (Required):

Guest Email (Required):

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
1 + 5
   


About the Linux Mail Server Setup and Howto Guide Forum

Forum Timezone: America/New_York

Most Users Ever Online: 60

Currently Online:
12 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 5
Topics: 343
Posts: 1062

Membership:

There are 966 Members
There have been 91 Guests

There is 1 Admin

Top Posters:

shanmugasundaram s – 46
Kendermin – 15
Ginger – 14
bighorn – 14
iron_michael86 – 12
Raminda – 11

Recent New Members: waveney, achal, niesul14, hesaum, sreevinodss, nasonov

Administrators: consultant (353 Posts)