Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.10)

Discussion in 'HOWTO-Related Questions' started by mrtot, Dec 3, 2008.

  1. mrtot

    mrtot New Member

    I hope this thread doesn't exist already.

    I just followed the tutorial and some hours of googling later I am even able to login to squirrelmail and send mails.

    Unfortunately I cannot receive mails :(

    I created an account at dyndns.com (say: myacc.webhop.net) and pointed it to my machines IP address. This obviously does work since I can access squirrelmail via myacc.webhop.net/squirrelmail

    When I try to send a mail to [email protected] the mail does not show up in squirrelmail.

    Any suggestions?

    Many thanks in advance!
     
  2. mrtot

    mrtot New Member

    Okay dudes, problem solved :)

    I opened port 25 in my router.
    After doing this mails sent to [email protected] got boounced back. I found the following error in my mail.log:

    Dec 4 18:32:00 blabla postfix/trivial-rewrite[6816]: warning: do not list domain myacc.webhop.net in BOTH mydestination and virtual_mailbox_domains

    To solve this problem I did the following:

    postconf -e 'mydestination = localhost, localhost.localdomain'

    Now I am able to send and retreive mail on my own mailserver... whooohooo!
     
  3. Rashef

    Rashef New Member

    I prefer not to open a new thread related to the same how-to...

    During my test I found out two troubles.

    The first one is quota related: I set up a 10485760 default quota as described into the how-to, and all the testing users have got this quota. But I'm receiving lots of attachments that increase my inbox up to 18045000 and over...
    What to check?

    The second problem is Apache related. I didn't change anything of the original preferences but the ones asked in the how-to. I'm able to connect to Squirrelmail within the same subnet of the Ubuntu machine (192.168.10.x). I'm able to connect to Squirrelmail even from 192.168.1.x (the Ubuntu machine is into a DMZ). But I can connect neither to Squirrelmail nor Apache homepage from outside... even if I can reach all the other services (SMTP, POP3, IMAP4).

    Thanks in advance!
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Any errors in your mail log?

    Please make sure that your ISP doesn't block port 80.
     
  5. Rashef

    Rashef New Member

    After a few days of testing... I get no error, it seems like there's no size limit... :confused:
    I checked /etc/postfix/mysql-virtual_mailbox_limit_maps.cf and I see no error. The quota set in the SQL table is 10485760.
    This is the mailbox:

    Code:
    root@node1:/home/vmail/domain.test/rashef/cur# ls -la
    total 27392
    drwx------ 2 vmail vmail    4096 2008-12-18 15:49 .
    drwx------ 9 vmail vmail    4096 2008-12-18 15:49 ..
    -rw------- 1 vmail vmail    1020 2008-12-03 18:17 1228324634.V801I13e03aM33596:2,S
    -rw------- 1 vmail vmail    2641 2008-12-03 18:18 1228324683.V801I13e03dM723580:2,RS
    -rw------- 1 vmail vmail 3609920 2008-12-04 11:54 1228388085.V801I13e05aM348643:2,S
    -rw------- 1 vmail vmail 3608091 2008-12-04 11:57 1228388230.V801I13e03fM851569:2,S
    -rw------- 1 vmail vmail 3608091 2008-12-04 12:00 1228388412.V801I13e05eM243803:2,S
    -rw------- 1 vmail vmail 3608721 2008-12-04 12:02 1228388552.V801I13e05fM358308:2,S
    -rw------- 1 vmail vmail 3609351 2008-12-04 12:07 1228388844.V801I13e060M886163:2,S
    -rw------- 1 vmail vmail 3609977 2008-12-04 12:11 1228389113.V801I13e061M263304:2,S
    -rw------- 1 vmail vmail 6327459 2008-12-18 15:42 1229611332.V801I13e068M606581:2,S
    P.S.: For the other problem, pfSense was not properly configured to allow connection between different subnet.
     
    Last edited: Dec 18, 2008
  6. falko

    falko Super Moderator ISPConfig Developer

    What do you see in the mail log when you send another big mail to that account?
     
  7. Rashef

    Rashef New Member

    I sent a new mail with a 6MB pdf attached.
    This is the mail.log:

    Code:
    Dec 19 18:20:40 node1 postfix/smtpd[14655]: connect from [I]my_external_smtp[/I][[I]my_external_ip[/I]]
    Dec 19 18:20:40 node1 postfix/smtpd[14655]: 7B0BBEBE11E: client=[I]my_external_smtp[/I][[I]my_external_ip[/I]]
    Dec 19 18:20:40 node1 postfix/cleanup[14659]: 7B0BBEBE11E: message-id=<C571964A.32CD%[I][email protected][/I]>
    
    When I opened Squirrelmail:

    Code:
    Dec 19 18:22:44 node1 postfix/qmgr[5220]: 7B0BBEBE11E: from=<[I][email protected][/I]>, size=6293607, nrcpt=1 (queue active)
    Dec 19 18:22:44 node1 postfix/smtpd[14655]: disconnect from [I]my_external_smtp[/I][[I]my_external_ip[/I]]
    Dec 19 18:22:47 node1 postfix/smtpd[14674]: connect from localhost.localdomain[127.0.0.1]
    Dec 19 18:22:47 node1 postfix/smtpd[14674]: DECA3EBE1A5: client=localhost.localdomain[127.0.0.1]
    Dec 19 18:22:47 node1 postfix/cleanup[14659]: DECA3EBE1A5: message-id=<C571964A.32CD%[I][email protected][/I]>
    Dec 19 18:22:47 node1 postfix/qmgr[5220]: DECA3EBE1A5: from=<[I][email protected][/I]>, size=6294080, nrcpt=1 (queue active)
    Dec 19 18:22:47 node1 postfix/smtpd[14674]: disconnect from localhost.localdomain[127.0.0.1]
    Dec 19 18:22:47 node1 amavis[4578]: (04578-03) Passed CLEAN, [91.80.36.30] [[I]my_external_ip[/I]] <[I][email protected][/I]> -> <[email protected]>, Message-ID: <C571964A.32CD%[I][email protected][/I]>, mail_id: tfUfepO0Tayk, Hits: -, size: 6293607, queued_as: DECA3EBE1A5, 3729 ms
    Dec 19 18:22:47 node1 postfix/smtp[14671]: 7B0BBEBE11E: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=127, delays=124/0/0/3.7, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=04578-03, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as DECA3EBE1A5)
    Dec 19 18:22:47 node1 postfix/qmgr[5220]: 7B0BBEBE11E: removed
    Dec 19 18:22:48 node1 postfix/virtual[14677]: DECA3EBE1A5: to=<[email protected]>, relay=virtual, delay=1.2, delays=1/0.02/0/0.16, dsn=2.0.0, status=sent (delivered to maildir)
    Dec 19 18:22:48 node1 postfix/qmgr[5220]: DECA3EBE1A5: removed
    
    Thank you so much!
     
    Last edited: Dec 19, 2008
  8. falko

    falko Super Moderator ISPConfig Developer

    That's all? Nothing else?

    Did you see any errors when you compiled Postfix with the quota patch?
     
  9. Rashef

    Rashef New Member

    I only saw:
    Code:
    dpkg-buildpackage: warning: Failed to sign .dsc and .changes file
     
  10. falko

    falko Super Moderator ISPConfig Developer

    I'd try to rebuild the Postfix package again. Maybe something went wrong the first time.
    Make sure that the quota patch applies without errors.
     
  11. Rashef

    Rashef New Member

    I rebuilt the package with no errors but it seems it continues working as the previous package. Since this is a testing machine I think I will start from scratch.

    P.S.: Do you think that I will able to use this plugin using your settings?
     
  12. falko

    falko Super Moderator ISPConfig Developer

    Not sure. But this software seems to be based on SquirrelMail, so at least it's possible. :)
     
  13. Jrob

    Jrob New Member

    I am able to send mail out to a outside address but I can not receive any mail. This is from the mail log on an attempt to send mail from one user to another. User2 is both a virtual user (email) and a real user on eoins01. User1 is just a virtual user for email. As it wont receive mail it did not create mail file's I created them manually, at which point both suirrelmail and evoultion will allow me to send mail. Both also act as if they are checking for new mail. The fconnection refused error's always seem contains the servers hostname.mydomain.com along with its real world IP address.



    Dec 23 23:03:42 eoins01 postfix/smtpd[7644]: connect from eoins01.mydomain.com[127.0.0.1]
    Dec 23 23:03:42 eoins01 postfix/smtpd[7644]: 5425F22A1ED: client=eoins01.mydomain.com[127.0.0.1]
    Dec 23 23:03:42 eoins01 postfix/cleanup[7653]: 5425F22A1ED: message-id=<[email protected]>
    Dec 23 23:03:42 eoins01 postfix/smtpd[7644]: disconnect from eoins01.mydomain.com[127.0.0.1]
    Dec 23 23:03:42 eoins01 postfix/qmgr[6533]: 5425F22A1ED: from=<[email protected]>, size=818, nrcpt=1 (queue active)
    Dec 23 23:03:42 eoins01 imapd: LOGIN, user=[email protected], ip=[::ffff:127.0.0.1], port=[46559], protocol=IMAP
    Dec 23 23:03:42 eoins01 imapd: LOGOUT, user=[email protected], ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=675, sent=203, time=0
    Dec 23 23:03:42 eoins01 imapd: LOGIN, user=[email protected], ip=[::ffff:127.0.0.1], port=[46562], protocol=IMAP
    Dec 23 23:03:42 eoins01 imapd: LOGOUT, user=[email protected], ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=119, sent=900, time=0
    Dec 23 23:03:50 eoins01 postfix/smtpd[7664]: connect from eoins01.mydomain.com[127.0.0.1]
    Dec 23 23:03:50 eoins01 postfix/smtpd[7664]: 25BC922A20C: client=eoins01.mydomain.com[127.0.0.1]
    Dec 23 23:03:50 eoins01 postfix/cleanup[7653]: 25BC922A20C: message-id=<[email protected]>
    Dec 23 23:03:50 eoins01 postfix/qmgr[6533]: 25BC922A20C: from=<[email protected]>, size=1331, nrcpt=1 (queue active)
    Dec 23 23:03:50 eoins01 amavis[7026]: (07026-01) Passed CLEAN, LOCAL [127.0.0.1] [127.0.0.1] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: HsEC1-61nQAY, Hits: 1.448, size: 818, queued_as: 25BC922A20C, 7705 ms
    Dec 23 23:03:50 eoins01 postfix/smtp[7655]: 5425F22A1ED: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=7.9, delays=0.13/0.05/0.01/7.7, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=07026-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 25BC922A20C)
    Dec 23 23:03:50 eoins01 postfix/qmgr[6533]: 5425F22A1ED: removed
    Dec 23 23:03:50 eoins01 postfix/smtp[7668]: connect to eoins01.mydomain.com[Real World IP ADDRESS]:25: Connection refused
    Dec 23 23:03:50 eoins01 postfix/smtp[7668]: 25BC922A20C: to=<[email protected]>, relay=none, delay=0.2, delays=0.02/0.03/0.15/0, dsn=4.4.1, status=deferred (connect to eoins01.mydomain.com[Real World IP ADDRESS]:25: Connection refused)
     
  14. Brun

    Brun New Member

    but
    Error that the service does not automatically creates a directory. Made for example. Where is wrong?
     
  15. falko

    falko Super Moderator ISPConfig Developer

    This does not work. If user2 is a system user, then all emails will go to that account instead of the virtual user2 account.

    What's the output of
    Code:
    netstat -tap
    ?
     
  16. falko

    falko Super Moderator ISPConfig Developer

    Did you send a welcome email to that account?
     
  17. Brun

    Brun New Member

    The problem is not created automatic in the directory /home/vmail
    When I made the directory manually squirrelmail wrote the following error:
    Everything done according to instructions.
    I have 2 network cards. One real IP, and the other virtual.
     
  18. falko

    falko Super Moderator ISPConfig Developer

    The directory is created automatically when the first email arrives - therefore my question.
     
  19. Brun

    Brun New Member

  20. falko

    falko Super Moderator ISPConfig Developer

    What's in the mail log when you send such a mail?
     

Share This Page