Postfix mail server configuration

Posted on 2013-08-30
Medium Priority
Last Modified: 2013-11-21
Hi All:
I know you people help a lot and try best for the solutions.
Here are my query:
1: I have installed CentOS 5.
2: I want to configure Postfix Mail server with all  prerequisite so that it would be fully functional in the organization.
3:- I also want Mail admins login here to administer your domain.
4:- After configuring this i may able to configure Ms outlook on employee so that they can use it for sending and receiving mail inbound or outbound.

In lay man i want full fledged running postfix mail server.
Warm regards
Sanjeev jha
Question by:Sanjeev jha
  • 28
  • 25
LVL 81

Expert Comment

ID: 39452684
What does the reference 2 represent, all prerequisite.

Do you have an AD environment?
You can integrate centos into AD.
There are many guides to setup postfix, dovecot, mail scanner, spamassassin, etc.

The guides include images.

Author Comment

by:Sanjeev jha
ID: 39452826
Thanks for reply.

All Prerequisite= For running Postfix mail server what software required to install i.e. dovecot, My Sql, Sendmail, amavis, spamassassin etc.

We have workgroup environment not AD environment and all clients are windows.

Please Suggest me guides which help me to install and configure postfix mail server; I am new and trying to learn by the help of you people.
LVL 81

Expert Comment

ID: 39453242
yum install postfix dovecot mail scanner mysql mysql-server

A simple search for postfix mail scanner dovecot return many responses.
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.


Author Comment

by:Sanjeev jha
ID: 39456517

I am getting this below error
telnet: connect to address Connection refused

please help me.
LVL 81

Expert Comment

ID: 39456636
Could you post the exact command your are typing?
telnet 25

Author Comment

by:Sanjeev jha
ID: 39457959
telnet localhost pop3

Author Comment

by:Sanjeev jha
ID: 39458228
while am doing /etc/init.d/dovecot restart in log am find below errow

dovecot: Aug 30 17:03:28 Error: auth(default): Can't open configuration file /etc/dovecot-sql-conf: No such file or directory
dovecot: Aug 30 17:03:28 Error: child 22530 (auth) returned error 89

please suggest why this error coming and what would be solution for this.
LVL 81

Expert Comment

ID: 39458605

Author Comment

by:Sanjeev jha
ID: 39463627
Thanks for you reply:

Just I would like to mention how am i going for postfix mail server on centos 5

first and foremost:- am following this link step by step and doing same.


2nd following this link to accomplice my job


Please i am not able to understand below. Please help me what does it mean ""to replace "mail_admin_password" with a password you select for this user.""
"Create a mail administration user called mail_admin and grant it permissions on the mail database with the following commands. Please be sure to replace "mail_admin_password" with a password you select for this user."
LVL 81

Expert Comment

ID: 39463893
Tells you to add a user with username mail_admin and set it with a password of your choice.
as an example they use a reference for the password as "mail_admin_password".
When you choose your own password, you need to make sure that you replace "mail_admin_password" with the one you chose for the username "mail_admin"

are you using useradd or webmin to create a user on your system?
1) create username mail_admin
2) set password for the username "mail_admin"
3) adjust the configurations where you see "mail_admin_password", replace it with the one you set in step 2 above.

Author Comment

by:Sanjeev jha
ID: 39467114
Thanks for your support:


first part of configuration i.e Postfix and My SQL from above link

For Dovecot configuration I am following below link but there is some confusion i.e
when i am trying to modify to Dovecot below point is confusion.
1: I am able to do vi /etc/dovecot.conf but in this link it is given /etc/dovecot/dovecot.conf so from where dovecot folder came.I mean first go etc then dovecot and then dovecot.con file.

2: from where i should get this file; am not able to understand exactly.

Warm Regards
Sanjeev jha

Author Comment

by:Sanjeev jha
ID: 39467442
I am doing all these things in Centos 5

Please help in completing this project. At least able to send mail internally in my network.
LVL 81

Expert Comment

ID: 39467535
Note, your Dovecot guide places all doveot related configurations in /etc/dovecot/

But the postfix related configuration sets /etc/dovecot-sql.conf which are referenced in /etc/dovecot.conf
Edit /etc/dovecot.conf and change the dovecot-sql.conf from /etc to /etc/dovecot

FYI: when following multiple guides, it is important to compare what configuration file each uses and how they are related.

The otherportionofyourquestion deals with the mysql access.


When you created the mysql login for use by postfix, this username/password needs to be entered in the above configuration file in place of mail_admin/mail_admin_password.

Author Comment

by:Sanjeev jha
ID: 39470499

[root@mail ~]# telnet localhost 25
telnet: connect to address Connection refused
telnet: Unable to connect to remote host: Connection refused

Please help me where I am wrong and why this error is giving.

LVL 81

Expert Comment

ID: 39470696
Check whether postfix is running which it does not seem to be
ps -ef | grep postfix

Check whether the required services are configured to start on boot.

chkconfig --list | egrep "(postfix|dovecot|spam|mysql)"
enable each service to start.
ls /etc/init.d/ | egrep "(postfix|dovecot|spam|mysql)" | while read a; do
./"$a" start
chkconfig on "$a"

Author Comment

by:Sanjeev jha
ID: 39471021
I have checked
Postfix is running
and all services which you have mentioned is configured to start on boot

but still facing the same issue
telnet localhost 25

 telnet localhost 25
telnet: connect to address Connection refused
telnet: Unable to connect to remote host: Connection refused
LVL 81

Expert Comment

ID: 39471816
netstat -an | grep ":25"
lsof -i:25
ps -ef | grep postfix
lsof -p <postfix process ID> | grep -i tcp

Author Comment

by:Sanjeev jha
ID: 39479888
Thanks for your prompt reply

Now I am able to do telnet

If i am following below process to create user and password and configuring into outlook it is not working.  

are you using useradd or webmin to create a user on your system?
1) create username mail_admin
2) set password for the username "mail_admin"

## Please guide me how i would be able to create email id of user through webmail or any other option to create email id.
## Please also help me to configure squire ll mail in my post fix mail server
LVL 81

Expert Comment

ID: 39480169
mail_admin is a place holder. and is for use within mysql to manage the data.
in mysql
create login <username of your choice> identified by <password of your choice>

This is the credentials dovecot, postfix will use to access the user/alias/domain map in mysql to handle incoming messages. or authentication requests from users wanting to retrieve their messages.

Author Comment

by:Sanjeev jha
ID: 39480372
I did same as you suggested

I am getting error in receiving the mail. In sending it is displaying completed.

What would be problem. why in receiving it is giving error.
LVL 81

Expert Comment

ID: 39480743
post the output from the log /var/log/maillog
I need to see what the error is.

receiving you mean you check for email delivered to your username?
Or receiving meaning an email sent to your domain?

I've done the same before i.e. following a guide thinking I know what comes next, but each guide uses their own "terminology/references" that are easily missed. When that happens, it is a pain in the ... to track down.
the log files of the individual components are an excellent resource when troubleshooting.
i.e. maillog has incoming/outgoing/internal delivery information for postfix.
IMHO, first make sure that the postfix functions as intended i.e. message sent to user@yourdomain.com is delivered into the mailbox/Maildir depending on your settings/configuration.
Once this is done, start handling the dovecot configuration making sure that the same message storage defined for postfix is being used by dovecot.

Author Comment

by:Sanjeev jha
ID: 39482642
[root@mail ~]# tail -f /var/log/maillog
Sep  7 14:59:26 mail postfix/postfix-script: stopping the Postfix mail system
Sep  7 14:59:26 mail postfix/master[8826]: terminating on signal 15
Sep  7 14:59:26 mail postfix/postalias[8840]: warning: /etc/aliases.db: duplicate entry: "root"
Sep  7 14:59:26 mail postfix/postalias[8840]: warning: /etc/aliases, line 99: need name:value pair
Sep  7 14:59:26 mail postfix/postalias[8840]: warning: /etc/aliases, line 100: need name:value pair
Sep  7 14:59:27 mail postfix/postfix-script: starting the Postfix mail system
Sep  7 14:59:27 mail postfix/master[8886]: daemon started -- version 2.3.3, configuration /etc/postfix
Sep  7 15:06:50 mail postfix/smtpd[8917]: connect from mail.saicomputer.com[]
Sep  7 15:11:50 mail postfix/smtpd[8917]: timeout after CONNECT from mail.saicomputer.com[]
Sep  7 15:11:50 mail postfix/smtpd[8917]: disconnect from mail.saicomputer.com[]
LVL 81

Expert Comment

ID: 39482831
One non critical issue is with the contents in /etc/aliases.
There is nothing in the log other than a connection that was made and then allowed to timeout.

Author Comment

by:Sanjeev jha
ID: 39483764
What do you suggest? If i understood correctly it means that something wrong in aliases configuration.

Author Comment

by:Sanjeev jha
ID: 39483799
I am very perplex that whether i will be succeed or not in configuring postfix mail server.

Please try to give me easy and best solution because only I have faith on you. otherwise it would be impossible to learn and ultimately i have to give up the hope.
LVL 81

Expert Comment

ID: 39484061
Now you are ready to test your mail server. Use a local mail client, mutt, pine, etc. to send test messages.
Try the following replacing the email address with those of valid users.
echo "To: <recipient>
From: <sender>
Subject: test mail processing

Test message
"|/usr/sbin/sendmail -oi -t -fsender_email_address

Using the above and variations of senders and recipients you can make sure your mail server functions correctly:
Sending and handling local recipient emails, to remote recipients.

Once you send three messages, attach versus post the maillog data. You might want to reduction the first portion of the email address I.e. username@somedomain xxxxx@somedomain.

Once the mail server functionality is confirmed, you can move to verifying the dovecot functionality (even though it can be confirmed ahead of time, if no messages are being received all you'll see is login functionality.)

Author Comment

by:Sanjeev jha
ID: 39487358
Hi: using Mutt and  mail -s <subject> <mailaddress> command receive below message in log

Sep  7 22:41:08 mail postfix/qmgr[8889]: DAC623AC587: removed
Sep  7 22:45:08 mail postfix/pickup[9667]: A9D5B3AC587: uid=0 from=<root>
Sep  7 22:45:08 mail postfix/cleanup[9938]: A9D5B3AC587: message-id=<20130907171508.GA9930@mail.saicomputer.com>
Sep  7 22:45:08 mail postfix/qmgr[8889]: A9D5B3AC587: from=<root@saicomputer.com>, size=458, nrcpt=1 (queue active)
Sep  7 22:45:08 mail postfix/local[9943]: warning: database /etc/aliases.db is older than source file /etc/aliases
Sep  7 22:45:08 mail postfix/local[9943]: A9D5B3AC587: to=<sanju@saicomputer.com>, relay=local, delay=0.23, delays=0.15/0.01/0/0.06, dsn=2.0.0, status=sent (delivered to maildir)
Sep  7 22:45:08 mail postfix/qmgr[8889]: A9D5B3AC587: removed

Note: I am confuse why my server not functioning in MS outlook. Please guide me.
LVL 81

Expert Comment

ID: 39487678
after you make changes to /etc/aliases you need to run newaliases

Your log shows that the message you sent was delievered to the local Maildir.

In your MS outlook, are your outgoing SMTP server the IP of this postfix server?

run postconf -v | grep -i 'mynetworks'

Need to see whether your defined your Local Network as allowed to relay through your server.

If you are sending through an outside provider from Outlook, your mail is handled by Google.

Author Comment

by:Sanjeev jha
ID: 39490764

I have tried both and getting below error.

When i am assigning postfix mailserver ip then it is asking for authentication; mean asking password for the email id which i have already reset thrice but it asking again.

When i am assigning postfix mailserver FQDN means server full name then it giving error

" Log onto incoming mail server(pop3): Outlook cannot connect to your incoming(pop3)
e-mail server."

"Send test e-mail message: Outlook cannot connect to your outgoing(SMTP) e-mail server.
LVL 81

Expert Comment

ID: 39490958
Could you double check that you did not configure the outlook account to require a password from the outgoing server?  

The issue is that you have not configured your postfix to allow your local network IPs to relay through it.
run the following on the mail server.
postconf -v | grep -i mynetwork

edit /etc/postfix/main.cf
search for mynetworks and make sure your local network 192.168.x.x/24 etc. is in there.

Presumably we are still working to make sure postfix is functioning as intended and not whether dovecot which is the imap/pop server allows outlook to retrieve the emails?

One thing at a time.

Author Comment

by:Sanjeev jha
ID: 39495924
Running this command "postconf -v | grep -i mynetwork " as you suggested getting below message

mynetworks =
mynetworks_style = subnet
parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
smtpd_client_event_limit_exceptions = ${smtpd_client_connection_limit_exceptions:$mynetworks}
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination

Please you can get something and guide accordingly.
LVL 81

Expert Comment

ID: 39496174
Double check your outlook account configuration to see whether on the outgoing portion you have it setup to provide login/authentication.

Is the IP from which you are transmitting is on the same LAN as the postfix server and your system's IP is on the

Author Comment

by:Sanjeev jha
ID: 39498411
LVL 81

Expert Comment

ID: 39498942
Really? You need to provide more detail to which yes applies and what issues you have.

Author Comment

by:Sanjeev jha
ID: 39502519
Postfix mail server and client machines both are on same LAN. I mean

LVL 81

Expert Comment

ID: 39504134
post the entire output of postconf -v

Lets try the following.
From the windows system:
do you have putty?
anything in <> means it needs to be replaced with the appropriate data. After each command you should receive a 2xx message (OK)  when you send the data command you should get a 354 command (OK and continue)
Using putty connect to the mail server port 25
ehlo <yourdesktopsystemname>
mail from: <youremailaddress>
rcpt to: <recipientemailaddress>
From: <youremailaddress>
To: <recipientemailaddress>
Subject: Testing


Open in new window

If you get an error 5xx relaying denied after you send the rcpt to: command, this means that you did not configure your postfix server to allow the local LAN to relay,

Author Comment

by:Sanjeev jha
ID: 39508828
Hi Sir:
post the entire output of postconf -v
2bounce_notice_recipient = postmaster
access_map_reject_code = 554
address_verify_default_transport = $default_transport
address_verify_local_transport = $local_transport
address_verify_map =
address_verify_negative_cache = yes
address_verify_negative_expire_time = 3d
address_verify_negative_refresh_time = 3h
address_verify_poll_count = 3
address_verify_poll_delay = 3s
address_verify_positive_expire_time = 31d
address_verify_positive_refresh_time = 7d
address_verify_relay_transport = $relay_transport
address_verify_relayhost = $relayhost
address_verify_sender = postmaster
address_verify_sender_dependent_relayhost_maps = $sender_dependent_relayhost_maps
address_verify_service_name = verify
address_verify_transport_maps = $transport_maps
address_verify_virtual_transport = $virtual_transport
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_mail_to_commands = alias, forward
allow_mail_to_files = alias, forward
allow_min_user = no
allow_percent_hack = yes
allow_untrusted_routing = no
alternate_config_directories =
always_bcc =
anvil_rate_time_unit = 60s
anvil_status_update_time = 600s
append_at_myorigin = yes
append_dot_mydomain = yes
application_event_drain_time = 100s
authorized_flush_users = static:anyone
authorized_mailq_users = static:anyone
authorized_submit_users = static:anyone
backwards_bounce_logfile_compatibility = yes
berkeley_db_create_buffer_size = 16777216
berkeley_db_read_buffer_size = 131072
best_mx_transport =
biff = yes
body_checks =
body_checks_size_limit = 51200
bounce_notice_recipient = postmaster
bounce_queue_lifetime = 5d
bounce_service_name = bounce
bounce_size_limit = 50000
bounce_template_file =
broken_sasl_auth_clients = yes
canonical_classes = envelope_sender, envelope_recipient, header_sender, header_recipient
canonical_maps =
cleanup_service_name = cleanup
command_directory = /usr/sbin
command_execution_directory =
command_expansion_filter = 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
command_time_limit = 1000s
config_directory = /etc/postfix
connection_cache_protocol_timeout = 5s
connection_cache_service_name = scache
connection_cache_status_update_time = 600s
connection_cache_ttl_limit = 2s
content_filter =
daemon_directory = /usr/libexec/postfix
daemon_timeout = 18000s
debug_peer_level = 2
debug_peer_list =
default_database_type = hash
default_delivery_slot_cost = 5
default_delivery_slot_discount = 50
default_delivery_slot_loan = 3
default_destination_concurrency_limit = 20
default_destination_recipient_limit = 50
default_extra_recipient_limit = 1000
default_minimum_delivery_slots = 3
default_privs = nobody
default_process_limit = 100
default_rbl_reply = $rbl_code Service unavailable; $rbl_class [$rbl_what] blocked using $rbl_domain${rbl_reason?; $rbl_reason}
default_recipient_limit = 10000
default_transport = smtp
default_verp_delimiters = +=
defer_code = 450
defer_service_name = defer
defer_transports =
delay_logging_resolution_limit = 2
delay_notice_recipient = postmaster
delay_warning_time = 0h
deliver_lock_attempts = 20
deliver_lock_delay = 1s
disable_dns_lookups = no
disable_mime_input_processing = no
disable_mime_output_conversion = no
disable_verp_bounces = no
disable_vrfy_command = no
dont_remove = 0
double_bounce_sender = double-bounce
duplicate_filter_limit = 1000
empty_address_recipient = MAILER-DAEMON
enable_original_recipient = yes
error_notice_recipient = postmaster
error_service_name = error
execution_directory_expansion_filter = 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
expand_owner_alias = no
export_environment = TZ MAIL_CONFIG LANG
fallback_transport =
fallback_transport_maps =
fast_flush_domains = $relay_domains
fast_flush_purge_time = 7d
fast_flush_refresh_time = 12h
fault_injection_code = 0
flush_service_name = flush
fork_attempts = 5
fork_delay = 1s
forward_expansion_filter = 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
forward_path = $home/.forward${recipient_delimiter}${extension}, $home/.forward
frozen_delivered_to = yes
hash_queue_depth = 1
hash_queue_names = deferred, defer
header_address_token_limit = 10240
header_checks =
header_size_limit = 102400
helpful_warnings = yes
home_mailbox = Maildir/
hopcount_limit = 50
html_directory = no
ignore_mx_lookup_error = no
in_flow_delay = 1s
inet_interfaces = all
inet_protocols = ipv4
initial_destination_concurrency = 5
internal_mail_filter_classes =
invalid_hostname_reject_code = 501
ipc_idle = 100s
ipc_timeout = 3600s
ipc_ttl = 1000s
line_length_limit = 2048
lmtp_bind_address =
lmtp_bind_address6 =
lmtp_cname_overrides_servername = no
lmtp_connect_timeout = 0s
lmtp_connection_cache_destinations =
lmtp_connection_cache_on_demand = yes
lmtp_connection_cache_time_limit = 2s
lmtp_connection_reuse_time_limit = 300s
lmtp_data_done_timeout = 600s
lmtp_data_init_timeout = 120s
lmtp_data_xfer_timeout = 180s
lmtp_defer_if_no_mx_address_found = no
lmtp_destination_concurrency_limit = $default_destination_concurrency_limit
lmtp_destination_recipient_limit = $default_destination_recipient_limit
lmtp_discard_lhlo_keyword_address_maps =
lmtp_discard_lhlo_keywords =
lmtp_enforce_tls = no
lmtp_generic_maps =
lmtp_host_lookup = dns
lmtp_lhlo_name = $myhostname
lmtp_lhlo_timeout = 300s
lmtp_line_length_limit = 990
lmtp_mail_timeout = 300s
lmtp_mx_address_limit = 5
lmtp_mx_session_limit = 2
lmtp_pix_workaround_delay_time = 10s
lmtp_pix_workaround_threshold_time = 500s
lmtp_quit_timeout = 300s
lmtp_quote_rfc821_envelope = yes
lmtp_randomize_addresses = yes
lmtp_rcpt_timeout = 300s
lmtp_rset_timeout = 20s
lmtp_sasl_auth_enable = no
lmtp_sasl_mechanism_filter =
lmtp_sasl_password_maps =
lmtp_sasl_path =
lmtp_sasl_security_options = noplaintext, noanonymous
lmtp_sasl_tls_security_options = $lmtp_sasl_security_options
lmtp_sasl_tls_verified_security_options = $lmtp_sasl_tls_security_options
lmtp_sasl_type = cyrus

lmtp_send_xforward_command = no
lmtp_sender_dependent_authentication = no
lmtp_skip_5xx_greeting = yes
lmtp_starttls_timeout = 300s
lmtp_tcp_port = 24
lmtp_tls_CAfile =
lmtp_tls_CApath =
lmtp_tls_cert_file =
lmtp_tls_dcert_file =
lmtp_tls_dkey_file = $lmtp_tls_dcert_file
lmtp_tls_enforce_peername = yes
lmtp_tls_exclude_ciphers =
lmtp_tls_key_file = $lmtp_tls_cert_file
lmtp_tls_loglevel = 0
lmtp_tls_mandatory_ciphers = medium
lmtp_tls_mandatory_exclude_ciphers =
lmtp_tls_mandatory_protocols = SSLv3, TLSv1
lmtp_tls_note_starttls_offer = no
lmtp_tls_per_site =
lmtp_tls_policy_maps =
lmtp_tls_scert_verifydepth = 5
lmtp_tls_secure_cert_match = nexthop
lmtp_tls_security_level =
lmtp_tls_session_cache_database =
lmtp_tls_session_cache_timeout = 3600s
lmtp_tls_verify_cert_match = hostname
lmtp_use_tls = no
lmtp_xforward_timeout = 300s
local_command_shell =
local_destination_concurrency_limit = 2
local_destination_recipient_limit = 1
local_header_rewrite_clients = permit_inet_interfaces
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
local_transport = local:$myhostname
luser_relay =
mail_name = Postfix
mail_owner = postfix
mail_release_date = 200600825
mail_spool_directory = /var/mail
mail_version = 2.3.3
mailbox_command =
mailbox_command_maps =
mailbox_delivery_lock = fcntl, dotlock
mailbox_size_limit = 51200000
mailbox_transport =
mailbox_transport_maps =
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
maps_rbl_domains =
maps_rbl_reject_code = 554
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions =
max_idle = 100s
max_use = 100
maximal_backoff_time = 4000s
maximal_queue_lifetime = 5d
message_reject_characters =
message_size_limit = 30720000
message_strip_characters =
milter_command_timeout = 30s
milter_connect_macros = j {daemon_name} v
milter_connect_timeout = 30s
milter_content_timeout = 300s
milter_data_macros = i
milter_default_action = tempfail
milter_end_of_data_macros = i
milter_helo_macros = {tls_version} {cipher} {cipher_bits} {cert_subject} {cert_issuer}
milter_macro_daemon_name = $myhostname
milter_macro_v = $mail_name $mail_version
milter_mail_macros = i {auth_type} {auth_authen} {auth_author} {mail_addr}
milter_protocol = 2
milter_rcpt_macros = i {rcpt_addr}
milter_unknown_command_macros =
mime_boundary_length_limit = 2048
mime_header_checks = $header_checks
mime_nesting_limit = 100
minimal_backoff_time = 1000s
multi_recipient_bounce_reject_code = 550
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain local_recipient_maps =
mydomain = [redacted].com
myhostname = mail.[redacted].com
mynetworks =
mynetworks_style = subnet
myorigin = $mydomain
nested_header_checks = $header_checks
newaliases_path = /usr/bin/newaliases.postfix
non_fqdn_reject_code = 504
non_smtpd_milters =
notify_classes = resource, software
owner_request_special = yes
parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_acces
permit_mx_backup_networks =
pickup_service_name = pickup
plaintext_reject_code = 450
prepend_delivered_header = command, file, forward
process_id_directory = pid
propagate_unmatched_extensions = canonical, virtual
proxy_interfaces =
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recip
ient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_
qmgr_clog_warn_time = 300s
qmgr_fudge_factor = 100
qmgr_message_active_limit = 20000
qmgr_message_recipient_limit = 20000
qmgr_message_recipient_minimum = 10
qmqpd_authorized_clients =
qmqpd_error_delay = 1s
qmqpd_timeout = 300s
queue_directory = /var/spool/postfix
queue_file_attribute_count_limit = 100
queue_minfree = 0
queue_run_delay = 1000s
queue_service_name = qmgr
rbl_reply_maps =
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
receive_override_options =
recipient_bcc_maps =
recipient_canonical_classes = envelope_recipient, header_recipient
recipient_canonical_maps =
recipient_delimiter =
reject_code = 554
relay_clientcerts =
relay_destination_concurrency_limit = $default_destination_concurrency_limit
relay_destination_recipient_limit = $default_destination_recipient_limit
relay_domains =
relay_domains_reject_code = 554
relay_recipient_maps =
relay_transport = relay
relayhost =
relocated_maps =
remote_header_rewrite_domain =
require_home_directory = no
resolve_dequoted_address = yes
resolve_null_domain = no
resolve_numeric_domain = no
rewrite_service_name = rewrite
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sender_bcc_maps =
sender_canonical_classes = envelope_sender, header_sender
sender_canonical_maps =
sender_dependent_relayhost_maps =
sendmail_path = /usr/sbin/sendmail.postfix
service_throttle_time = 60s
setgid_group = postdrop
show_user_unknown_table_name = yes
showq_service_name = showq
smtp_always_send_ehlo = yes
smtp_bind_address =
smtp_bind_address6 =
smtp_cname_overrides_servername = no
smtp_connect_timeout = 30s
smtp_connection_cache_destinations =
smtp_connection_cache_on_demand = yes
smtp_connection_cache_time_limit = 2s
smtp_connection_reuse_time_limit = 300s
smtp_data_done_timeout = 600s
smtp_data_init_timeout = 120s
smtp_data_xfer_timeout = 180s
smtp_defer_if_no_mx_address_found = no
smtp_destination_concurrency_limit = $default_destination_concurrency_limit
smtp_destination_recipient_limit = $default_destination_recipient_limit
smtp_discard_ehlo_keyword_address_maps =
smtp_discard_ehlo_keywords =
smtp_enforce_tls = no
smtp_fallback_relay = $fallback_relay
smtp_generic_maps =
smtp_helo_name = $myhostname
smtp_helo_timeout = 300s
smtp_host_lookup = dns
smtp_line_length_limit = 990
smtp_mail_timeout = 300s
smtp_mx_address_limit = 5
smtp_mx_session_limit = 2
smtp_never_send_ehlo = no
smtp_pix_workaround_delay_time = 10s
smtp_pix_workaround_threshold_time = 500s
smtp_quit_timeout = 300s
smtp_quote_rfc821_envelope = yes
smtp_randomize_addresses = yes
smtp_rcpt_timeout = 300s
smtp_rset_timeout = 20s
smtp_sasl_auth_enable = no
smtp_sasl_mechanism_filter =
smtp_sasl_password_maps =
smtp_sasl_path =
smtp_sasl_security_options = noplaintext, noanonymous
smtp_sasl_tls_security_options = $smtp_sasl_security_options
smtp_sasl_tls_verified_security_options = $smtp_sasl_tls_security_options
smtp_sasl_type = cyrus
smtp_send_xforward_command = no
smtp_sender_dependent_authentication = no
smtp_skip_5xx_greeting = yes
smtp_skip_quit_response = yes
smtp_starttls_timeout = 300s
smtp_tls_CAfile =
smtp_tls_CApath =
smtp_tls_cert_file =
smtp_tls_dcert_file =
smtp_tls_dkey_file = $smtp_tls_dcert_file
smtp_tls_enforce_peername = yes
smtp_tls_exclude_ciphers =
smtp_tls_key_file = $smtp_tls_cert_file
smtp_tls_loglevel = 0
smtp_tls_mandatory_ciphers = medium
smtp_tls_mandatory_exclude_ciphers =
smtp_tls_mandatory_protocols = SSLv3, TLSv1
smtp_tls_note_starttls_offer = yes
smtp_tls_per_site =
smtp_tls_policy_maps =
smtp_tls_scert_verifydepth = 5
smtp_tls_secure_cert_match = nexthop, dot-nexthop
smtp_tls_security_level =
smtp_tls_session_cache_database =
smtp_tls_session_cache_timeout = 3600s
smtp_tls_verify_cert_match = hostname
smtp_use_tls = yes
smtp_xforward_timeout = 300s
smtpd_authorized_verp_clients = $authorized_verp_clients
smtpd_authorized_xclient_hosts =
smtpd_authorized_xforward_hosts =
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_client_connection_count_limit = 50
smtpd_client_connection_rate_limit = 0
smtpd_client_event_limit_exceptions = ${smtpd_client_connection_limit_exceptions:$mynetworks}
smtpd_client_message_rate_limit = 0
smtpd_client_new_tls_session_rate_limit = 0
smtpd_client_recipient_rate_limit = 0
smtpd_client_restrictions =
smtpd_data_restrictions =
smtpd_delay_open_until_valid_rcpt = yes
smtpd_delay_reject = yes
smtpd_discard_ehlo_keyword_address_maps =
smtpd_discard_ehlo_keywords =
smtpd_end_of_data_restrictions =
smtpd_enforce_tls = no
smtpd_error_sleep_time = 1s
smtpd_etrn_restrictions =
smtpd_expansion_filter = \t\40!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
smtpd_forbidden_commands = CONNECT GET POST
smtpd_hard_error_limit = 20
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_history_flush_threshold = 100
smtpd_junk_command_limit = 100
smtpd_milters =
smtpd_noop_commands =
smtpd_null_access_lookup_key = <>
smtpd_peername_lookup = yes
smtpd_policy_service_max_idle = 300s
smtpd_policy_service_max_ttl = 1000s
smtpd_policy_service_timeout = 100s
smtpd_proxy_ehlo = $myhostname
smtpd_proxy_filter =
smtpd_proxy_timeout = 100s
smtpd_recipient_limit = 1000
smtpd_recipient_overshoot_limit = 1000
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = no
smtpd_restriction_classes =
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_exceptions_networks =
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_type = dovecot
smtpd_sender_login_maps =
smtpd_sender_restrictions =
smtpd_soft_error_limit = 10
smtpd_starttls_timeout = 300s
smtpd_timeout = 300s
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_CApath =
smtpd_tls_always_issue_session_ids = yes
smtpd_tls_ask_ccert = no
smtpd_tls_auth_only = no
smtpd_tls_ccert_verifydepth = 5
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_dcert_file =
smtpd_tls_dh1024_param_file =
smtpd_tls_dh512_param_file =
smtpd_tls_dkey_file = $smtpd_tls_dcert_file
smtpd_tls_exclude_ciphers =
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_mandatory_exclude_ciphers =
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_received_header = yes
smtpd_tls_req_ccert = no
smtpd_tls_security_level =
smtpd_tls_session_cache_database =
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_wrappermode = no
smtpd_use_tls = yes
soft_bounce = no
stale_lock_time = 500s
strict_7bit_headers = no
strict_8bitmime = no
strict_8bitmime_body = no
strict_mime_encoding_domain = no
strict_rfc821_envelopes = no
sun_mailtool_compatibility = no
swap_bangpath = yes
syslog_facility = mail
syslog_name = postfix
tls_daemon_random_bytes = 32
tls_export_cipherlist = ALL:+RC4:@STRENGTH
tls_high_cipherlist = !EXPORT:!LOW:!MEDIUM:ALL:+RC4:@STRENGTH
tls_low_cipherlist = !EXPORT:ALL:+RC4:@STRENGTH
tls_medium_cipherlist = !EXPORT:!LOW:ALL:+RC4:@STRENGTH
tls_null_cipherlist = !aNULL:eNULL+kRSA
tls_random_bytes = 32
tls_random_exchange_name = ${config_directory}/prng_exch
tls_random_prng_update_period = 3600s
tls_random_reseed_period = 3600s
tls_random_source = dev:/dev/urandom
trace_service_name = trace
transport_maps =
transport_retry_time = 60s
trigger_timeout = 10s
undisclosed_recipients_header = To: undisclosed-recipients:;
unknown_address_reject_code = 450
unknown_client_reject_code = 450
unknown_hostname_reject_code = 450
unknown_local_recipient_reject_code = 550
unknown_relay_recipient_reject_code = 550
unknown_virtual_alias_reject_code = 550
unknown_virtual_mailbox_reject_code = 550
unverified_recipient_reject_code = 450
unverified_sender_reject_code = 450
verp_delimiter_filter = -=+
virtual_alias_domains =
virtual_alias_expansion_limit = 1000
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_alias_recursion_limit = 1000
virtual_destination_concurrency_limit = $default_destination_concurrency_limit
virtual_destination_recipient_limit = $default_destination_recipient_limit
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_lock = fcntl
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_minimum_uid = 100
virtual_transport = dovecot
virtual_uid_maps = static:5000
LVL 81

Expert Comment

ID: 39509284
As long as you are on the network when you try to send through this mail server, you should be fine. Double check the IP of the system from which you are sending when you are being prompted for a password.
Double check your account configuration within outlook to make sure you are not setting that authentication is required for sending email out through your internal mail server.

Author Comment

by:Sanjeev jha
ID: 39511419
After running mentioned command am getting below.
ehlo mail
250-SIZE 30720000
250 DSN
mail from: sanju@x.com
250 2.1.0 Ok
rcpt to: sanju@x.com
250 2.1.5 Ok
354 End data with <CR><LF>.<CR><LF>
From: sanju@x.com
To: sanju@x.com
we the people of Inidia having solomly ressolved to constitued India into
soverign democratic and republice to secure
250 2.0.0 Ok: queued as 93D2D3AC586
503 5.5.1 Error: need RCPT command
421 4.4.2 mail.x.com Error: timeout exceeded
Connection closed by foreign host
LVL 81

Expert Comment

ID: 39511599
Ok, that works for a single recipient.
Try repeating the recipient line
Rcpt to: <recipient>

The flow is
Ehlo once
Or every message
Mail from:
Rcpt to: <recipient> as many recipients as needed
From: <sender>
To: <recipient>
Subject: subject

Message body.

. (A single period indicates the end of message)

What I am asking you to try once you paste the 30 recipient, you may see a delay in the response from the server
As you get to the 200th. You may have to wait longer.

You can use a script perl or what you are comfortable with that will repeatedly enter the recipient and report how long it takes to get the response from server after each recipient.

The timeout from the server is normal meaning after a certain amount of time it stopped receiving data.  This is a configuration usually 120 seconds.
LVL 81

Expert Comment

ID: 39511633
I seem to have been answering the wrong question.  Once the message is accepted, you need to look at the log for the entry referenced in the response queued as [reference number]
This way you can see what happened with the message.

Author Comment

by:Sanjeev jha
ID: 39524109
Actually I want to configure postfix admin through which i can create user email id ,delete,reset password, create group email id etc. Please help me to configure postfix admin.

Sanjeev jha
LVL 81

Expert Comment

ID: 39525400
You have to choose what method you will use?
You can use LDAP as the data repository where your users/domain/and how the emails are handled.
You can use VIRTUAL setup.
You can use local/virtual.

webmin is one tool to manage the system in a graphical interface, there are others.

The solution in an open source environment is that you need to find the components that meet your needs and add/install them.

I believe before you try to setup the management components, make sure the underlying services are functional and function correctly.

What is your environment made of?
Do you have an existing central user management LDAP/AD?

Author Comment

by:Sanjeev jha
ID: 39527772

"msqladmin -u mail password newpassword" using this command and getting below error please help me to understand. if possible then please clear it with example

error/output: "bash: msqladmin: command not found"

Author Comment

by:Sanjeev jha
ID: 39527775

"msqladmin -u mail password newpassword" using this command and getting below error please help me to understand. if possible then please clear it with example

error/output: "bash: msqladmin: command not found"
LVL 81

Expert Comment

ID: 39527858
msqladmin where did you get a reference to this command?
mysqladmin is a mysql based admin tool.
What is it you are trying to do?

Below is just a discussion of the various options based on what I think you are trying to do.  DO NOT run any of the commands until it is clear that it matches what you want done.

to alter a local account password, you would use passwd running as root.
passwd username
you will be prompted for the new password. confirm new password.

to alter a password within mysql
you have to login into mysql (mysql -u root [-p if password is needed])
then you would run an update
update mysql.user set password=Password('newpassword') where mysql.name='username'
flush privileges

within mysql the Password() function encrypts the plain text password. To see it work without making any alterations/affecting any data and is safe to run.

select Password('this is a test');
and you'll see a table response with unrecognizable character string

Author Comment

by:Sanjeev jha
ID: 39533081
I am following only things suggested by you. I mean to say you have suggested different link for configuring postfix mail server. In another system i was trying to follow another link and link is this
LVL 81

Expert Comment

ID: 39533145
Presumably, all the components are now working as intended and all that remains is the "administration tool".

Look for "postfixadmin" a web based tool to administer postfix. Your complete requirements might not be supported I.e. Defining a set of users (mail admins)

The search may help with guides using/configuring this tool for your system.

Author Comment

by:Sanjeev jha
ID: 39571336
This is the very best site you have mentioned ; it says all the thing which i am looking for but   how all these things would be implemented. If you through some light it would be great help for me.

How all these things would be implemented in Postfix mail server.

LVL 81

Expert Comment

ID: 39571359
Your latest question is extremely broad/vague.

It provides you the various options that can achieve the result you want. You have to pick the approach you want.

Author Comment

by:Sanjeev jha
ID: 39576392
I was talking about this site in which it has been mentioned all these things i am looking for
example: managing my mail server through postfix admin; i have already mentioned that I am a novice and learning Linux and biggest task for me to learn Postfix mail server configuration and manage day to day task, for accomplish this task i am struggling since one month but yet not able to achieve my goal and only hope is you. it is very difficult for me to master in all these things lik PHP, POSTFIX, MYSQL, so my earnest request to you is only to guide me such quantum of knowledge so that am able to configure it correctly and save my job. i would be great help if you could do that for me.

Looking forward for your positive response.

Warm regards
Sanjeev Jha

Author Comment

by:Sanjeev jha
ID: 39594271
please through some light for above query I need deep study for all. or any advise for the same.
LVL 81

Accepted Solution

arnold earned 1000 total points
ID: 39594351
yum install php apache2 mysql-server dovecot

When you download the package, there are install guides.

Deals with configuring the mysql database for use.

You need to take the first steps and follow the guide.
I am uncertain on what it is your expectations are.

Your question is similar to someone approaching a swim coach and saying, I want to learn to swim, so that I can compete "next week" professionally.

You should take it a step at a time to first familiarize yourself with the normal functioning of postfix and how to diagnose simple issues I.e. Emails are not being delivered etc.
Then you would add the postfixadmin mysql as the backend where user and domain information is stored. Then repeat the testing for email handling and normal operations.

If you blindly setup without understanding how things work, I almost can guarantee that your stint will end when an inadvertent error leads to an important mailing getting lost.

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Cron is one of the most popular and basic utilities found on Unix systems. Combined with other tools, cron makes it exceptionally easy to automate a broad range of tasks on your server.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question