Creating mailbox with perfect-server-opensuse-12.2-x86_64-apache2-dovecot-ispconfig-3

Discussion in 'Server Operation' started by RandomGuy, Dec 12, 2013.

  1. RandomGuy

    RandomGuy New Member

    Hello,

    I followed the tutorial "perfect-server-opensuse-12.2-x86_64-apache2-dovecot-ispconfig-3" skipping the DNS, FTP and Quota steps since I don't require those on my server. Additionally I used the ISP-Config panel to create a mail-domain Server='test.mydomain.com', Domain='test.mydomain.com'. I set up a Mailbox with name "test" and alias "[email protected]". I can open the mailbox with Squirrelmail and successfully send emails to my gmail account. I can also use Thunderbird to access the mailbox remotely and store emails in the draft folder. When I try to send an email from my gmail account to the test-mailbox however I receive a reply:

    Code:
    This is the mail system at host test.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
    
    <[email protected]>: unknown user: "test"
    
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.1.1
    Diagnostic-Code: X-Postfix; unknown user: "test"
    I tried to fix that by adding a system user "test" and in fact i did not get that response anymore. The mail-log now seems to indicate that the email was delivered to the users mailbox, however it does not show up in squirrelmail nor is it accessible via pop3/imap nor does it seem to be located under /var/vmail/test.mydomain.com/test/Maildir.

    I read some of the other posts in this forum and already tried "http://mxtoolbox.com/". It passes 6 test and produces 2 errors "A Valid TXT Record was not found", "A Valid SPF Record was not found". I don't think that this is related to the problem. ISP Config reports one error "Ftp service offline", the other services are running. I checked the mail-log and can't find anything there that would explain the error.

    Code:
    Dec 12 22:10:04 h2236111 postfix/smtpd[10102]: connect from localhost[127.0.0.1]
    Dec 12 22:10:05 h2236111 dovecot: imap-login: Disconnected (disconnected before greeting, waited 0 secs): user=<>, rip=::1, lip=::1, secured, session=<9Bz/xFztnwAAAAAAAAAAAAAAAAAAAAAB>
    Dec 12 22:10:05 h2236111 postfix/smtpd[10102]: lost connection after CONNECT from localhost[127.0.0.1]
    Dec 12 22:10:05 h2236111 postfix/smtpd[10102]: disconnect from localhost[127.0.0.1]
    Dec 12 22:10:05 h2236111 dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<V2YCxVztEAAAAAAAAAAAAAAAAAAAAAAB>
    Dec 12 22:10:36 h2236111 dovecot: auth-worker(10156): mysql(localhost): Connected to database dbispconfig
    Dec 12 22:10:36 h2236111 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=10159, secured, session=<mZXexlztogAAAAAAAAAAAAAAAAAAAAAB>
    Dec 12 22:10:36 h2236111 dovecot: imap([email protected]): Disconnected: Logged out in=90 out=490
    Dec 12 22:13:56 h2236111 postfix/smtpd[10378]: connect from mail-ie0-f174.google.com[209.85.223.174]
    Dec 12 22:13:59 h2236111 postfix/trivial-rewrite[10385]: warning: do not list domain test.mydomain.com in BOTH mydestination and virtual_mailbox_domains
    Dec 12 22:14:00 h2236111 postfix/smtpd[10378]: E884743524: client=mail-ie0-f174.google.com[209.85.223.174]
    Dec 12 22:14:01 h2236111 postfix/cleanup[10397]: E884743524: message-id=<[email protected]m>
    Dec 12 22:14:03 h2236111 postfix/smtpd[10378]: disconnect from mail-ie0-f174.google.com[209.85.223.174]
    Dec 12 22:14:12 h2236111 postfix/qmgr[13436]: E884743524: from=<[email protected]>, size=1709, nrcpt=1 (queue active)
    Dec 12 22:14:30 h2236111 amavis[13861]: (13861-01) (!)connect to /var/run/clamav/clamd failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd: No such file or directory
    Dec 12 22:14:31 h2236111 amavis[13861]: (13861-01) (!)connect to /var/run/clamav/clamd failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd: No such file or directory
    Dec 12 22:14:32 h2236111 amavis[13861]: (13861-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd, retrying (2)
    Dec 12 22:14:37 h2236111 amavis[13861]: (13861-01) (!)connect to /var/run/clamav/clamd failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd: No such file or directory
    Dec 12 22:14:38 h2236111 amavis[13861]: (13861-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd (All attempts (1) failed connecting to /var/run/clamav/clamd) at (eval 138) line 603.\n
    Dec 12 22:14:41 h2236111 amavis[13861]: (13861-01) (!)WARN: all primary virus scanners failed, considering backups
    Dec 12 22:15:13 h2236111 postfix/smtpd[10378]: connect from localhost[127.0.0.1]
    Dec 12 22:15:17 h2236111 postfix/smtpd[10378]: lost connection after CONNECT from localhost[127.0.0.1]
    Dec 12 22:15:19 h2236111 postfix/smtpd[10378]: disconnect from localhost[127.0.0.1]
    Dec 12 22:15:22 h2236111 dovecot: imap-login: Disconnected (disconnected before greeting, waited 0 secs): user=<>, rip=::1, lip=::1, secured, session=<shh+11zttQAAAAAAAAAAAAAAAAAAAAAB>
    Dec 12 22:15:24 h2236111 dovecot: pop3-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=::1, lip=::1, secured, session=<9eKB11ztJgAAAAAAAAAAAAAAAAAAAAAB>
    Dec 12 22:16:25 h2236111 clamd[2301]: SelfCheck: Database status OK.
    Dec 12 22:17:19 h2236111 postfix/smtpd[10766]: connect from unknown[127.0.0.1]
    Dec 12 22:17:22 h2236111 postfix/trivial-rewrite[10768]: warning: do not list domain test.mydomain.com in BOTH mydestination and virtual_mailbox_domains
    Dec 12 22:17:23 h2236111 postfix/smtpd[10766]: B396B43525: client=unknown[127.0.0.1]
    Dec 12 22:17:25 h2236111 postfix/cleanup[10774]: B396B43525: message-id=<[email protected]m>
    Dec 12 22:17:27 h2236111 postfix/qmgr[13436]: B396B43525: from=<[email protected]>, size=2137, nrcpt=1 (queue active)
    Dec 12 22:17:29 h2236111 postfix/trivial-rewrite[10768]: warning: do not list domain test.mydomain.com in BOTH mydestination and virtual_mailbox_domains
    Dec 12 22:17:31 h2236111 postfix/local[10777]: B396B43525: to=<[email protected]>, relay=local, delay=2.9, delays=2/0.71/0/0.15, dsn=2.0.0, status=sent (delivered to mailbox)
    Dec 12 22:17:33 h2236111 postfix/qmgr[13436]: B396B43525: removed
    Dec 12 22:17:35 h2236111 amavis[13861]: (13861-01) Passed CLEAN {RelayedOpenRelay}, [209.85.223.174]:57191 [209.85.223.174] <[email protected]> -> <[email protected]>, Queue-ID: E884743524, Message-ID: <[email protected]m>, mail_id: M9assLa75kou, Hits: 0.741, size: 1709, queued_as: B396B43525, 196933 ms
    Dec 12 22:17:36 h2236111 postfix/smtp[10398]: E884743524: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=209, delays=1.4/0.6/18/189, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as B396B43525)
    Dec 12 22:17:37 h2236111 postfix/qmgr[13436]: E884743524: removed
    Dec 12 22:18:33 h2236111 postfix/anvil[10380]: statistics: max connection rate 1/60s for (smtp:209.85.223.174) at Dec 12 22:13:56
    Dec 12 22:18:34 h2236111 postfix/anvil[10380]: statistics: max connection count 1 for (smtp:209.85.223.174) at Dec 12 22:13:56
    Dec 12 22:18:34 h2236111 postfix/anvil[10380]: statistics: max message rate 1/60s for (smtp:209.85.223.174) at Dec 12 22:13:58
    Dec 12 22:18:34 h2236111 postfix/anvil[10380]: statistics: max cache size 1 at Dec 12 22:13:56

    The only thing that seems unusual to me is "do not list domain test.mydomain.com in BOTH mydestination and virtual_mailbox_domains" however I don't know how to fix that warning. The mail-queue is empty.
    To clarify I only need the mailserver to host one mailbox. I don't care if the mails are stored in a directory or database, nor do I mind creating a system user for every mail user. I guess I'm missing something fairly basic. Up to this point I just followed the tutorial. I don't really understand how to configure the related services by hand. I checked the /etc/postfix/main.cf "virtual_transport" and "smtpd_sasl_type" are both set to "dovecot". Otherwise I don't really know what the most of these settings imply. Any help would be much appreciated.

    Thanks in advance for your time
     
  2. RandomGuy

    RandomGuy New Member

    Okay so I did some additional testing and figured out what the problem might be. I rent a server cloud from strato.de where I can create virtual linux servers. Each server comes with a implicit default domain in the form of XXX.stratoserver.net. When I create a mail-domain with ISP-config for that domain everything works just fine. However the mail-domain for my own domain mail.mydomain.com does not receive incoming mail as I already pointed out, although the messages are received and turn up in the mail-log I posted above. They just don't seem to be put into the vmail folder. The domain is properly bound to the server since I can reach ISP-Config under mail.mydomain.com:8080 and mxtoolbox.com also reports that this domain is set up properly.
    Unfortunatelly I can not change the server IP to a static IP otherwise I can't reach the server anymore and have to use a terminal console to revert back to a DHCP IP. This seems to be some limitation that comes with the virtual server. I think the problem might be that my servers hostname is set to XXX.stratoserver.net instead of mail.mydomain.com. I changed the hostname in the DNS tab of yast applied the /etc/HOSTNAME and etc/hosts file but still, hostname reports XXX and dnsdomainname report stratoserver.net instead of mail and mydomain.com. If been searching for quite some time and using yast and applying the etc/HOSTNAME and etc/hosts files normally seems to do the trick.
    Does anyone know why the hostname does not change on my server or point out how to get postfix/dovecot to work regardless?
    I also tried a domain alias mail.mydomain.com -> XXX.stratoserver.net but that didn't really change anything ...
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not the problem. the hostname can be any domain name, as long as it exists in dns and as long as it is not identical to a domain that you want to use to receive email.

    The problem is this:

    Check mydestination in postfix main.cf and remove all domains from there that you want to use as domains for mailboxes. Then restart postfix.

    Beside that, check your clamav installation, there seems to be something broken.
     
  4. RandomGuy

    RandomGuy New Member

    Thank you very much :D It works now. I had to remove the domain from 'mydestination'. Man I was looking in all the wrong places.
    As for the clam warnings, it turns out when I create a new virtual server in my server cloud the repositories are different from the offical SUSE repositories. I changed them to the offical ones, uninstalled clam and reinstalled it now that works as well. Thanks again for your time.
    Oh yes I also wanted to point out that creating a system user was not at all required as I initially thought, the error was caused by my missconfiguration.
     

Share This Page