1

Topic: Cannot send mail from iRedMail server to other domains except itself

Hello

I'm stuck at something that bothers me a few weeks now.
I successfully installed server with 2 domains and emails are coming in ok,
But whenever the user tries to send from Roundcube webmail to some other person (let's say to any domain you can imagine - gmail.com, yahoo.com etc.) the mail cannot be sent.

The error log says  (I replaced SERVERNAME and servername.fqdn.com for my reasons not exposing real domain name and server):

May 24 14:21:56 SERVERNAME roundcube: [24-May-2010 14:21:56 +0200]: Successful login for user@domain.com (id 2) from 192.168.0.254 
May 24 14:22:07 SERVERNAME postfix/smtpd[3385]: connect from servername.fqdn.com[127.0.0.1]
May 24 14:22:07 SERVERNAME postfix/smtpd[3385]: NOQUEUE: reject: RCPT from servername.fqdn.com[127.0.0.1]: 550 5.1.1 <user.receiving-mail@example.com>: Recipient address rejected: User unknown in virtual mailbox table; from=<user@domain.com > to=<user.receiving-mail@example.com> proto=ESMTP helo=<servername.fqdn.com>
May 24 14:22:07 SERVERNAME roundcube: Invalid response code received from server (550): 
May 24 14:22:07 SERVERNAME postfix/smtpd[3385]: disconnect from servername.fqdn.com[127.0.0.1]
May 24 14:22:07 SERVERNAME roundcube: [24-May-2010 14:22:07 +0200] SMTP Error: SMTP error: Failed to add recipient 'user.receiving-mail@example.com' in /var/www/roundcubemail-0.2.1/program/steps/mail/func.inc on line 1296 (POST /mail/?_task=mail&_action=send)

Also as I'm administrator/root I can't send mail from SSH terminal session with same error.

My /etc/hosts :

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
192.168.0.14     servername.fqdn.com  SERVERNAME

Please help me with this, because I need to be able to send emails outside (some aliases must be redirected to gmail.com) and it doesn't work the way I wanted.

If needed I will post other config. files.

Thank you

Regards,
Thomas

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Cannot send mail from iRedMail server to other domains except itself

May 24 14:22:07 SERVERNAME postfix/smtpd[3385]: NOQUEUE: reject: RCPT from servername.fqdn.com[127.0.0.1]: 550 5.1.1 <user.receiving-mail@example.com>: Recipient address rejected: User unknown in virtual mailbox table; from=<user@domain.com > to=<user.receiving-mail@example.com> proto=ESMTP helo=<servername.fqdn.com>

Postfix can't find this user via SQL/LDAP lookup.

Can you please post your postfix config? Get it via command:

# postconf -n | grep -Ei '(mysql|ldap)'

3

Re: Cannot send mail from iRedMail server to other domains except itself

This is the thing:

root@~#>postconf -n | grep -Ei '(mysql|ldap)'
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql_recipient_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql_recipient_bcc_maps_user.cf
relay_recipient_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql_sender_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql_sender_bcc_maps_user.cf
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql_sender_login_maps.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

I have lost it in the postfix config. There's so many that I don't know...
What I would like is to be able to send any email from server (local messages like LogWatch, users that login into RoundCube etc.) to outside world without being open relay.

Thank you for your time

Regards,
Thomas

4

Re: Cannot send mail from iRedMail server to other domains except itself

Hello again

After reading/trying/fail I came very close to resolving but as usual it's not working.
In postfix main.cf  I added:
mydestination =

and nothing seems to let it send the mail to outer world (ex. mydestination = $myhostname, $mydomain or anything else)
What I get in maillog:

SERVERNAME postfix/qmgr[13872]: A70E714740072: from=<root@SERVERNAME.fqdn.com>, size=34002, nrcpt=1 (queue active)
SERVERNAME postfix/pipe[17130]: A70E714740072: to=<recipient_address@domain.com>, relay=dovecot, delay=0.06, delays=0.04/0.01/0/0.01, dsn=5.1.1, status=bounced (user unknown)
SERVERNAME postfix/cleanup[17126]: AFE8414740073: message-id=<20100527110048.AFE8414740073@SERVERNAME.fqdn.com>
SERVERNAME postfix/qmgr[13872]: AFE8414740073: from=<>, size=35762, nrcpt=1 (queue active)
SERVERNAME postfix/bounce[17132]: A70E714740072: sender non-delivery notification: AFE8414740073
SERVERNAME postfix/qmgr[13872]: A70E714740072: removed
SERVERNAME postfix/smtpd[17134]: connect from unknown[192.168.0.254]
SERVERNAME postfix/smtp[17133]: warning: host SERVERNAME.fqdn.com[xxx.yyy.zzz.xyz]:25 greeted me with my own hostname SERVERNAME.fqdn.com
SERVERNAME postfix/smtp[17133]: warning: host SERVERNAME.fqdn.com[xxx.yyy.zzz.xyz]:25 replied to HELO/EHLO with my own hostname SERVERNAME.fqdn.com
SERVERNAME postfix/smtp[17133]: AFE8414740073: to=<root@SERVERNAME.fqdn.com>, relay=SERVERNAME.fqdn.com[xxx.yyy.zzz.xyz]:25, delay=0.07, delays=0/0.01/0.05/0, dsn=5.4.6, status=bounced (mail for SERVERNAME.fqdn.com loops back to myself)
SERVERNAME postfix/qmgr[13872]: AFE8414740073: removed
SERVERNAME postfix/smtpd[17134]: disconnect from unknown[192.168.0.254]

What should I enter to
mydestination =
to let the server send emails to outer world (all domains) and not being Open relay ?

Please help if possible.

Regards,
Thomas

5

Re: Cannot send mail from iRedMail server to other domains except itself

This one [ http://marc.info/?l=postfix-users&m … 99&w=2 ] has:
mydestination = $myhostname localhost.$mydomain

and I tried it and it doesn't send emails neither.

I get:

roundcube: [27-May-2010 22:20:52 +0200] SMTP Error: SMTP error: Failed to add recipient 'recipient_address@domain.com' in /var/www/roundcubemail-0.2.1/program/steps/mail/func.inc on line 1296 (POST /email/?_task=mail&_action=send)

What should I do.

Please help me.

6

Re: Cannot send mail from iRedMail server to other domains except itself

Default in iRedMail:

mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname

7 (edited by hansolo 2010-06-01 17:29:19)

Re: Cannot send mail from iRedMail server to other domains except itself

Thank you,
I added

default = $myhostname, localhost, localhost.....l

and it seems successfuly sending emails to other domains.

It just happens that I messed up the server configuration as to my error's are trying to tell me.

The problem is:
servername/domain in vmail (roundcube, postfixadmin) is having a domain ' exampledomain.com' listed in virtual mailbox and NO user mailbox is defined as 'recipient_mail@exampledomain.com'
and in this case this user recipient really exists on that domain and is already defined (receiving emails ok), just not on this test server....
so the mail is not sent.

Now the trick is how to send emails to that 'exampledomain.com' without checking if this 'recipient_mail' exists on iRedMail server ?
(what I'm doing is messing up a live server running emails with new Mail server having iRedMail installed <- new server (testing), to get it in production environment)

I hope I explained what I'm trying to do as I'd like to solve this to move the server to production.

Is it anything I can do about this ?

Thank you for answer ...

Regards,
Thomas