1

Topic: Email Aliasing with mysql as backend

Hi all,

I deployed iRedmail with mysql as backend on ubuntu 9.04 server. Everything is working ok but when i try to alias a mail account on
# vim /etc/aliases
go to the last line
info:   root,admin,raskin
and saved it.
Then i run
# newaliases
It wont work.mails send to info are not forwarded to those account.Then i tried this

# postalias hash:/etc/postfix/aliases

It still wont work.Pls suggest me how to solve the problem.I am in bad trouble.
Thanking you all

2

Re: Email Aliasing with mysql as backend

Try:

# postalias hash:/etc/postfix/aliases

Without hash:.

3

Re: Email Aliasing with mysql as backend

ZhangHuangbin wrote:

Try:

# postalias hash:/etc/postfix/aliases

Without hash:.


I know we run all shell command without #.The # is just for root mode.So bro pls tell me another way to solve this.I have tried ur command than i asked for help.thanking you.

4

Re: Email Aliasing with mysql as backend

you can try edit /etc/postfix/aliases

and

postalias /etc/postfix/aliases

5

Re: Email Aliasing with mysql as backend

Tried both /etc/aliases or /etc/postfix/aliases and the above command.Still it wont works.

6

Re: Email Aliasing with mysql as backend

Please post output of 'postconf -n'.

7

Re: Email Aliasing with mysql as backend

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_min_user = no
append_dot_mydomain = no
biff = no
bounce_queue_lifetime = 1d
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
delay_warning_time = 0h
disable_vrfy_command = yes
enable_original_recipient = no
header_checks = pcre:/etc/postfix/header_checks.pcre
home_mailbox = Maildir/
inet_interfaces = all
mail_name = mail
mail_version = 0.5.1
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 15728640
maximal_backoff_time = 4000s
maximal_queue_lifetime = 1d
message_size_limit = 10485760
minimal_backoff_time = 300s
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
mydomain = example.com
myhostname = example.com
mynetworks = 127.0.0.0/8,
mynetworks_style = subnet
myorigin = example.com
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps
queue_run_delay = 300s
readme_directory = no
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql_recipient_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql_recipient_bcc_maps_user.cf
recipient_delimiter = +
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql_relay_domains.cf
relay_recipient_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
relayhost =
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql_sender_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql_sender_bcc_maps_user.cf
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname SMTP $mail_name (ICONNECT)
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_enforce_tls = no
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,permit_sasl_authenticated, check_helo_access pcre:/etc/postfix/helo_access.pcre
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted_recipient, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, check_policy_service inet:127.0.0.1:10031
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_sasl_local_domain =
smtpd_sasl_path = dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql_sender_login_maps.cf
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_tls_cert_file = /etc/ssl/certs/iRedMail_CA.pem
smtpd_tls_key_file = /etc/ssl/private/iRedMail.key
smtpd_tls_loglevel = 0
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = proxy:mysql:/etc/postfix/mysql_transport_maps_user.cf, proxy:mysql:/etc/postfix/mysql_transport_maps_domain.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:1001
virtual_mailbox_base = /var/vmail/vmail01
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 1001
virtual_transport = dovecot
virtual_uid_maps = static:1001

8

Re: Email Aliasing with mysql as backend

You have this in postfix:

alias_maps = hash:/etc/postfix/aliases

So edit /etc/postfix/aliases and execute 'postalias /etc/postfix/aliases' or 'newaliases' should work for you.

Reference: http://www.postfix.org/postconf.5.html#alias_maps

9

Re: Email Aliasing with mysql as backend

ZhangHuangbin wrote:

You have this in postfix:

alias_maps = hash:/etc/postfix/aliases

So edit /etc/postfix/aliases and execute 'postalias /etc/postfix/aliases' or 'newaliases' should work for you.

Reference: http://www.postfix.org/postconf.5.html#alias_maps



Still not working.Anyone has solved it please help.

10

Re: Email Aliasing with mysql as backend

Anyone who has used aliasing iRedMail with mysql backend pls help me.

11

Re: Email Aliasing with mysql as backend

Can you please paste related mail log here? e.g. sending mail to your alias address.

12

Re: Email Aliasing with mysql as backend

ZhangHuangbin wrote:

Can you please paste related mail log here? e.g. sending mail to your alias address.


i am editing the alias in /etc/postfix/aliases like this

info:        x@example.com, y@example.com

i have tried using postfixadmin.It works but as postfixadmin supports only 1 account for aliasing its a major problem for me because i need mail sent to info@example.com will be delivered to x@example.com and y@example.com.

ok i will paste the log here.

13

Re: Email Aliasing with mysql as backend

raskin_ece wrote:

i have tried using postfixadmin.It works but as postfixadmin supports only 1 account for aliasing its a major problem for me

It supports multiple alias addresses.
Create one alias, save, and then edit it. You can add more.

P.S. Ask postfixadmin to improve it.

14

Re: Email Aliasing with mysql as backend

This is output of log when i try to send mail to a alias account info@example.com from a@example.com.
i made alias in /etc/postfix/aliases like this
info:        x@example.com, y@example.com

Log Output from tail -f /var/log/mail.log


May 22 23:05:02 mail roundcube: [22-May-2010 23:05:02 +0600]: Successful login for a@example.com (id 2) from 112.137.4.3
May 22 23:05:29 mail postfix/smtpd[4082]: connect from localhost[127.0.0.1]
May 22 23:05:29 mail postfix/smtpd[4082]: A2E404D8062: client=localhost[127.0.0.1], sasl_method=LOGIN, sasl_username=a@example.com
May 22 23:05:29 mail postfix/cleanup[4085]: A2E404D8062: message-id=<76c26fffb9ab7e0608e8ca31fae8b4c0@127.0.0.1>
May 22 23:05:29 mail postfix/qmgr[24356]: A2E404D8062: from=<a@example.com>, size=695, nrcpt=1 (queue active)
May 22 23:05:29 mail roundcube: [22-May-2010 23:05:29 +0600]: User a@example.com [112.137.4.3]; Message for <info@example.com>; 250: 2.0.0 Ok: queued as A2E404D8062
May 22 23:05:29 mail postfix/smtpd[4082]: disconnect from localhost[127.0.0.1]
May 22 23:05:29 mail postfix/smtpd[4096]: connect from localhost[127.0.0.1]
May 22 23:05:29 mail postfix/smtpd[4096]: DEE9A4D8063: client=localhost[127.0.0.1]
May 22 23:05:29 mail postfix/cleanup[4085]: DEE9A4D8063: message-id=<76c26fffb9ab7e0608e8ca31fae8b4c0@127.0.0.1>
May 22 23:05:29 mail postfix/qmgr[24356]: DEE9A4D8063: from=<a@example.com>, size=1645, nrcpt=1 (queue active)
May 22 23:05:29 mail postfix/smtpd[4096]: disconnect from localhost[127.0.0.1]
May 22 23:05:29 mail amavis[22053]: (22053-04) Passed CLEAN, MYNETS LOCAL [127.0.0.1] [127.0.0.1] <a@example.com> -> <a@example.com>, Message-ID: <76c26fffb9ab7e0608e8ca31fae8b4c0@127.0.0.1>, mail_id: qRNZksRPaBUH, Hits: -7.093, size: 695, queued_as: DEE9A4D8063, 244 ms
May 22 23:05:29 mail postfix/smtp[4091]: A2E404D8062: to=<info@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.28, delays=0.03/0/0/0.25, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=22053-04, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as DEE9A4D8063)
May 22 23:05:29 mail postfix/qmgr[24356]: A2E404D8062: removed
May 22 23:05:29 mail postfix/pipe[4097]: DEE9A4D8063: to=<info@example.com>, relay=dovecot, delay=0.07, delays=0.02/0.01/0/0.04, dsn=2.0.0, status=sent (delivered via dovecot service)
May 22 23:05:29 mail postfix/qmgr[24356]: DEE9A4D8063: removed

15

Re: Email Aliasing with mysql as backend

i know Zhang that i can add more alias in postfixadmin but it supports only 1 account for a alias  not more than that.Anyway when postfixadmin will fix the problem than we will use but now what can i do for aliasing in IRedMail with mysql backend??

16

Re: Email Aliasing with mysql as backend

I think you are talking about this:
http://postfixadmin.sourceforge.net/screenshots/postfixadmin-admin-create-alias.jpg

After created your alias address, for example, info@example.com in PostfixAdmin, you can edit it, add more addresses for info@example.com.
Are we talking about the same thing?

17

Re: Email Aliasing with mysql as backend

ZhangHuangbin wrote:

I think you are talking about this:
http://postfixadmin.sourceforge.net/screenshots/postfixadmin-admin-create-alias.jpg

After created your alias address, for example, info@example.com in PostfixAdmin, you can edit it, add more addresses for info@example.com.
Are we talking about the same thing?



Yes we are.Thanks a lot zhang.We can add more address just by editing an existing alias in postfixadmin.Finally i get rid of aliasing.Thanks again.iRedMail Rocks.

18

Re: Email Aliasing with mysql as backend

hey Zhang could you tell me how to upgrade rouncubemail and postfixadmin if it is possible.
Thanking you bro.

19

Re: Email Aliasing with mysql as backend

You can follow their official upgrade tutorials.
For iRedMail, normally, we only provide upgrade tutorial when new iRedMail release available.

20

Re: Email Aliasing with mysql as backend

ZhangHuangbin wrote:

You can follow their official upgrade tutorials.
For iRedMail, normally, we only provide upgrade tutorial when new iRedMail release available.


can we upgrade the existing roundcube and postfixadmin to the new version on iRedMail 0.5.1??

21

Re: Email Aliasing with mysql as backend

Of course you can upgrade them manually.

22

Re: Email Aliasing with mysql as backend

Hi All,

     I am new to this forum.  I am also facing problem after installing the iRedmail. Please help.

https://example.org/postfixadmin/login.php
Connect: Access denied for user 'vmailadmin'@'localhost' (using password: YES)


I am posting 'postconf -n' output.

May 23 13:03:12 example postfix/cleanup[18473]: warning: 6F690708A9: virtual_alias_maps map lookup problem for anurag@gmail.com
May 23 13:03:12 example postfix/pickup[18099]: 6FCD6708A9: uid=500 from=<sheeladevimail>
May 23 13:03:12 example postfix/cleanup[18473]: warning: 6FCD6708A9: virtual_alias_maps map lookup problem for postmaster@example.org
May 23 13:03:12 example postfix/pickup[18099]: warning: 7004B708A9: message has been queued for 2 days
May 23 13:03:12 example postfix/pickup[18099]: 7004B708A9: uid=0 from=<root>
May 23 13:03:12 example postfix/cleanup[18473]: warning: 7004B708A9: virtual_alias_maps map lookup problem for www@example.org
May 23 13:03:12 example postfix/pickup[18099]: 703B7708A9: uid=0 from=<root>
May 23 13:03:12 example postfix/cleanup[18473]: 703B7708A9: message-id=<20100523130312.703B7708A9@example.org>
May 23 13:03:12 example postfix/cleanup[18473]: warning: 703B7708A9: virtual_alias_maps map lookup problem for root@example.org
May 23 13:03:12 example postfix/pickup[18099]: warning: 70751708A9: message has been queued for 2 days
May 23 13:03:12 example postfix/pickup[18099]: 70751708A9: uid=0 from=<root>
May 23 13:03:12 example postfix/cleanup[18473]: warning: 70751708A9: virtual_alias_maps map lookup problem for www@example.org
May 23 13:03:12 example postfix/pickup[18099]: warning: 70AEF708A9: message has been queued for 1 days
May 23 13:03:12 example postfix/pickup[18099]: 70AEF708A9: uid=0 from=<root>
May 23 13:03:12 example postfix/cleanup[18473]: 70AEF708A9: message-id=<20100523130312.70AEF708A9@example.org>
May 23 13:03:12 example postfix/cleanup[18473]: warning: 70AEF708A9: virtual_alias_maps map lookup problem for root@example.org
May 23 13:03:13 example postfix/smtpd[18013]: warning: problem talking to service rewrite: Success
May 23 13:03:13 example postfix/smtpd[18388]: warning: problem talking to service rewrite: Connection reset by peer
May 23 13:03:13 example postfix/master[3405]: warning: process /usr/libexec/postfix/trivial-rewrite pid 18567 exit status 1
May 23 13:03:13 example postfix/master[3405]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
May 23 13:03:13 example postfix/smtpd[18193]: warning: problem talking to service rewrite: Success
May 23 13:03:13 example postfix/smtpd[18088]: warning: problem talking to service rewrite: Connection reset by peer
May 23 13:03:13 example postfix/master[3405]: warning: process /usr/libexec/postfix/trivial-rewrite pid 18568 exit status 1
May 23 13:03:13 example postfix/smtpd[18194]: warning: problem talking to service rewrite: Connection reset by peer
May 23 13:03:13 example postfix/smtpd[18418]: warning: problem talking to service rewrite: Success
May 23 13:03:13 example postfix/master[3405]: warning: process /usr/libexec/postfix/trivial-rewrite pid 18569 exit status 1
May 23 13:03:13 example postfix/smtpd[18091]: warning: problem talking to service rewrite: Success
May 23 13:03:13 example postfix/smtpd[18018]: warning: problem talking to service rewrite: Connection reset by peer
May 23 13:03:13 example postfix/master[3405]: warning: process /usr/libexec/postfix/trivial-rewrite pid 18570 exit status 1
May 23 13:03:14 example postfix/trivial-rewrite[18571]: fatal: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
May 23 13:03:15 example postfix/smtpd[18388]: warning: problem talking to service rewrite: Success
May 23 13:03:15 example postfix/smtpd[18013]: warning: problem talking to service rewrite: Connection reset by peer
May 23 13:03:15 example postfix/master[3405]: warning: process /usr/libexec/postfix/trivial-rewrite pid 18571 exit status 1
May 23 13:03:33 example postfix/pickup[18099]: 6AA28708A9: uid=0 from=<root>


Sorry in case I am posting at incorrect place... Not sure where should I start a new thread.

23

Re: Email Aliasing with mysql as backend

Please create a new forum topic