External Email Getting Lost

Discussion in 'General' started by jash, Nov 7, 2005.

  1. jash

    jash New Member

    I have followed the fantastic guide for Perfect Setup Fedora Core 4 and have successfully installed ISPConfig.
    I can send internal mail and log in via the IMAP method using my email client and this seems to be working correctly (Also via the webmail).
    However, I have also configured Fetchmail to collect my external email on some of my external accounts in order to test the sytem. These emails are being collected but are then getting bounced.
    My hostname is set as 'linuxserver'
    I have setup ISPConfig with a site 'jherrick.co.uk' which I also own as a domain name. I would like to get the whole sytem working correctly and so any help greatly appreciated!

    Extract of my maillog

    Code:
    name=linuxserver.linuxserver type=A: Host not found)
    Nov  7 10:55:45 localhost postfix/cleanup[26953]: 1DD2130C14B: message-id=<20051107105545.1DD2130C14B@linuxserver>
    Nov  7 10:55:45 localhost imapd[26955]: Login user=web1_jenson host=[192.168.5.6]
    Nov  7 10:55:45 localhost postfix/qmgr[26845]: 1DD2130C14B: from=<>, size=3312, nrcpt=1 (queue active)
    Nov  7 10:55:45 localhost postfix/qmgr[26845]: A15E230C149: removed
    Nov  7 10:55:45 localhost imapd[26955]: Logout user=web1_jenson host=[192.168.5.6]
    Nov  7 10:55:45 localhost postfix/smtp[26954]: 1DD2130C14B: to=<web1_jenson@linuxserver.linuxserver>, orig_to=<jenson@jherrick.co.uk>, relay=none, delay=0, status=bounced (Host or domain name not found. Name service error for name=linuxserver.linuxserver type=A: Host not found)
    Nov  7 10:55:45 localhost postfix/qmgr[26845]: 1DD2130C14B: removed
    Nov  7 10:57:04 localhost fetchmail[7014]: awakened at Mon 07 Nov 2005 10:57:04 GMT
    Nov  7 10:57:11 localhost fetchmail[7014]: 1 message for [email]jasonherrick@btinternet.com[/email] at mail.btinternet.com (1550 octets).
    Nov  7 10:57:11 localhost fetchmail[7014]: reading message [email]jasonherrick@btinternet.com@bt1.mail.vip.ukl.yahoo.com[/email]:1 of 1 (1020 octets)
    Nov  7 10:57:11 localhost postfix/smtpd[26950]: connect from localhost.localdomain[127.0.0.1]
    Nov  7 10:57:11 localhost postfix/smtpd[26950]: 346A430C149: client=localhost.localdomain[127.0.0.1]
    Nov  7 10:57:11 localhost postfix/cleanup[26953]: 346A430C149: message-id=<20051107105711.346A430C149@linuxserver>
    Nov  7 10:57:11 localhost fetchmail[7014]:  flushed
    Nov  7 10:57:11 localhost postfix/qmgr[26845]: 346A430C149: from=<jasonherrick@btinternet.com>, size=1475, nrcpt=1 (queue active)
    Nov  7 10:57:11 localhost postfix/smtp[26954]: 346A430C149: to=<jason@localhost.linuxserver>, orig_to=<jason@localhost>, relay=none, delay=0, status=bounced (Host or domain name not found. Name service error for name=localhost.linuxserver type=A: Host not found)
    Nov  7 10:57:11 localhost postfix/cleanup[26953]: 8358A30C14B: message-id=<20051107105711.8358A30C14B@linuxserver>
    Nov  7 10:57:11 localhost postfix/qmgr[26845]: 8358A30C14B: from=<>, size=3432, nrcpt=1 (queue active)
    Nov  7 10:57:11 localhost postfix/qmgr[26845]: 346A430C149: removed
    Nov  7 10:57:11 localhost postfix/smtp[26954]: 8358A30C14B: to=<jasonherrick@btinternet.com>, relay=mx1.bt.mail.yahoo.com[195.50.106.135], delay=0, status=sent (250 ok dirdel)
    Nov  7 10:57:11 localhost postfix/qmgr[26845]: 8358A30C14B: removed
    Nov  7 10:57:15 localhost fetchmail[7014]: 1 message for enact.freeserve.co.uk at pop.freeserve.net (1560 octets).
    Nov  7 10:57:15 localhost fetchmail[7014]: reading message [email]enact.freeserve.co.uk@pop.freeserve.com[/email]:1 of 1 (1560 octets)
    Nov  7 10:57:15 localhost postfix/smtpd[26998]: connect from localhost.localdomain[127.0.0.1]
    Nov  7 10:57:15 localhost postfix/smtpd[26998]: 8A3E130C149: client=localhost.localdomain[127.0.0.1]
    Nov  7 10:57:15 localhost postfix/cleanup[26953]: 8A3E130C149: message-id=<20051107105408.29CAD1C01668@mwinf3006.me.freeserve.com>
    Nov  7 10:57:15 localhost postfix/qmgr[26845]: 8A3E130C149: from=<jash@enact.freeserve.co.uk>, size=1865, nrcpt=1 (queue active)
    Nov  7 10:57:15 localhost fetchmail[7014]:  flushed
    Nov  7 10:57:15 localhost postfix/smtp[26954]: 8A3E130C149: to=<jason@localhost.linuxserver>, orig_to=<jason@localhost>, relay=none, delay=0, status=bounced (Host or domain name not found. Name service error for name=localhost.linuxserver type=A: Host not found)
    Nov  7 10:57:15 localhost postfix/cleanup[26953]: B42A030C14B: message-id=<20051107105715.B42A030C14B@linuxserver>
    Nov  7 10:57:15 localhost postfix/qmgr[26845]: B42A030C14B: from=<>, size=3820, nrcpt=1 (queue active)
    Nov  7 10:57:15 localhost postfix/qmgr[26845]: 8A3E130C149: removed
    Nov  7 10:57:15 localhost postfix/smtpd[26950]: disconnect from localhost.localdomain[127.0.0.1]
    Nov  7 10:57:15 localhost postfix/smtpd[26998]: disconnect from localhost.localdomain[127.0.0.1]
    Nov  7 10:57:15 localhost fetchmail[7014]: sleeping at Mon 07 Nov 2005 10:57:15 GMT
     
    Last edited: Nov 8, 2005
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    You should put linuxserver.linuxserver and localhost.linuxserver in /etc/hosts. Also put them at the end of /etc/postfix/local-host-names and restart Postfix.
     
  3. jash

    jash New Member

    Falko,
    Thanks very much for the quick reply. I have added as described and this has now allowed the mail through....but it has gone to my linux user 'jason' not 'web1_jason' as specified in my /etc/fetchmailrc
    Any suggestions ??? Thanks again.

    Code:
    # /etc/fetchmailrc for system-wide daemon mode
    # This file must be chmod 0600, owner fetchmail
    
    # Daemon configuration
    # These two are set in /etc/default/fetchmail
    set daemon        300                # Poll every 5 minutes
    set syslog                        # log through syslog facility
    set postmaster  root
    
    set no bouncemail                # avoid loss on 4xx errors
                                    # on the other hand, 5xx errors get
                                    # more dangerous...
    
    ##########################################################################
    # Hosts to pool
    ##########################################################################
    
    # Defaults ================================================= =============
    # Set antispam to -1, since it is far safer to use that together with
    # no bouncemail
    defaults:
    timeout 300
    antispam -1
    batchlimit 100
    
    poll pop.hotpop.com protocol POP3 user "jasonherrick@hotpop.com" there with password "password" is web1_jason here fetchall
    
    poll mail.btinternet.com protocol POP3 user "jasonherrick@btinternet.com" there with password "password" is web1_jason here fetchall
    
    poll pop.freeserve.net protocol POP3 user "enact.freeserve.co.uk" there with password "password" is web1_jason here fetchall
     
    Last edited: Nov 8, 2005
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's in the mail log?
     
  5. jash

    jash New Member

    My mail log is now:

    Code:
    Nov  7 15:55:58 localhost fetchmail[7014]: awakened at Mon 07 Nov 2005 15:55:58 GMT
    Nov  7 15:56:05 localhost fetchmail[7014]: 1 message for [email]jasonherrick@btinternet.com[/email] at mail.btinternet.com (1550 octets).
    Nov  7 15:56:05 localhost fetchmail[7014]: reading message [email]jasonherrick@btinternet.com@bt1.mail.vip.ukl.yahoo.com[/email]:1 of 1 (1020 octets)
    Nov  7 15:56:06 localhost postfix/smtpd[1399]: connect from localhost.localdomain[127.0.0.1]
    Nov  7 15:56:06 localhost postfix/smtpd[1399]: 295E330C149: client=localhost.localdomain[127.0.0.1]
    Nov  7 15:56:06 localhost postfix/cleanup[1402]: 295E330C149: message-id=<20051107155606.295E330C149@linuxserver>
    Nov  7 15:56:06 localhost postfix/qmgr[28652]: 295E330C149: from=<jasonherrick@btinternet.com>, size=1475, nrcpt=1 (queue active)
    Nov  7 15:56:06 localhost fetchmail[7014]:  flushed
    Nov  7 15:56:06 localhost postfix/local[1403]: 295E330C149: to=<jason@localhost.linuxserver>, orig_to=<jason@localhost>, relay=local, delay=0, status=sent (delivered to mailbox)
    Nov  7 15:56:06 localhost postfix/qmgr[28652]: 295E330C149: removed
    Nov  7 15:56:10 localhost fetchmail[7014]: 1 message for enact.freeserve.co.uk at pop.freeserve.net (1560 octets).
    Nov  7 15:56:10 localhost fetchmail[7014]: reading message [email]enact.freeserve.co.uk@pop.freeserve.com[/email]:1 of 1 (1560 octets)
    Nov  7 15:56:10 localhost postfix/smtpd[1406]: connect from localhost.localdomain[127.0.0.1]
    Nov  7 15:56:10 localhost postfix/smtpd[1406]: 87B5230C149: client=localhost.localdomain[127.0.0.1]
    Nov  7 15:56:10 localhost postfix/cleanup[1402]: 87B5230C149: message-id=<20051107155255.06C761C009A9@mwinf3114.me.freeserve.com>
    Nov  7 15:56:10 localhost fetchmail[7014]:  flushed
    Nov  7 15:56:10 localhost postfix/qmgr[28652]: 87B5230C149: from=<jash@enact.freeserve.co.uk>, size=1865, nrcpt=1 (queue active)
    Nov  7 15:56:10 localhost postfix/local[1403]: 87B5230C149: to=<jason@localhost.linuxserver>, orig_to=<jason@localhost>, relay=local, delay=0, status=sent (delivered to mailbox)
    Nov  7 15:56:10 localhost postfix/qmgr[28652]: 87B5230C149: removed
    Nov  7 15:56:10 localhost postfix/smtpd[1406]: disconnect from localhost.localdomain[127.0.0.1]
    Nov  7 15:56:10 localhost fetchmail[7014]: sleeping at Mon 07 Nov 2005 15:56:10 GMT
    Nov  7 15:56:10 localhost postfix/smtpd[1399]: disconnect from localhost.localdomain[127.0.0.1]
    Nov  7 15:58:19 localhost imapd[1458]: imap service init from 192.168.5.6
    Nov  7 15:58:20 localhost imapd[1458]: Login user=web1_jason host=[192.168.5.6]
    Nov  7 15:58:20 localhost imapd[1458]: Logout user=web1_jason host=[192.168.5.6]
    Nov  7 15:58:20 localhost imapd[1459]: imap service init from 192.168.5.6
    Nov  7 15:58:20 localhost imapd[1459]: Login user=web1_jason host=[192.168.5.6]
    Nov  7 15:58:20 localhost imapd[1460]: imap service init from 192.168.5.6
    Nov  7 15:58:20 localhost imapd[1460]: Login user=web1_jenson host=[192.168.5.6]
    Nov  7 15:58:20 localhost imapd[1460]: Logout user=web1_jenson host=[192.168.5.6]
    Nov  7 15:58:20 localhost imapd[1462]: imap service init from 192.168.5.6
    Nov  7 15:58:20 localhost imapd[1462]: Login user=web1_jenson host=[192.168.5.6]
    Nov  7 15:58:20 localhost imapd[1462]: Connection reset by peer, while reading line user=web1_jenson host=[192.168.5.6]
    Nov  7 15:58:20 localhost imapd[1464]: imap service init from 192.168.5.6
    Nov  7 15:58:20 localhost imapd[1464]: Login user=jason host=[192.168.5.6]
    Nov  7 15:58:20 localhost imapd[1464]: Command stream end of file, while reading line user=jason host=[192.168.5.6]
    Nov  7 15:58:20 localhost imapd[1465]: imap service init from 192.168.5.6
    Nov  7 15:58:20 localhost imapd[1465]: Login user=jason host=[192.168.5.6]
    Nov  7 15:58:21 localhost imapd[1465]: Connection reset by peer, while reading line user=jason host=[192.168.5.6]
    I am using the same fetchmailrc as previouly posted.

    Also from another user so internal mail on mail log

    Code:
    Nov  7 16:09:58 localhost imapd[1736]: imap service init from 192.168.5.6
    Nov  7 16:09:58 localhost imapd[1736]: Login user=web1_jenson host=[192.168.5.6]
    Nov  7 16:10:21 localhost postfix/smtpd[1749]: connect from unknown[192.168.5.6]
    Nov  7 16:10:21 localhost postfix/smtpd[1749]: 78B2E30C149: client=unknown[192.168.5.6]
    Nov  7 16:10:21 localhost postfix/cleanup[1752]: 78B2E30C149: message-id=<002601c5e3b5$c1dbf250$1530a8c0@jasons>
    Nov  7 16:10:21 localhost postfix/smtpd[1749]: disconnect from unknown[192.168.5.6]
    Nov  7 16:10:21 localhost postfix/qmgr[28652]: 78B2E30C149: from=<jenson@jherrick.co.uk>, size=1386, nrcpt=1 (queue active)
    Nov  7 16:10:21 localhost imapd[1754]: imap service init from 192.168.5.6
    Nov  7 16:10:21 localhost imapd[1754]: Login user=web1_jenson host=[192.168.5.6]
    Nov  7 16:10:22 localhost imapd[1754]: Logout user=web1_jenson host=[192.168.5.6]
    Nov  7 16:10:32 localhost postfix/local[1753]: 78B2E30C149: to=<web1_jason@linuxserver.linuxserver>, orig_to=<jason@jherrick.co.uk>, relay=local, delay=11, status=sent (delivered to command: /usr/bin/procmail -f-)
    Nov  7 16:10:32 localhost postfix/qmgr[28652]: 78B2E30C149: removed
    Nov  7 16:10:51 localhost imapd[1813]: imap service init from 192.168.5.6
    Nov  7 16:10:51 localhost imapd[1813]: Login user=web1_jason host=[192.168.5.6]
    Nov  7 16:10:51 localhost imapd[1813]: Logout user=web1_jason host=[192.168.5.6]
    Nov  7 16:10:51 localhost imapd[1817]: imap service init from 192.168.5.6
    Nov  7 16:10:51 localhost imapd[1817]: Login user=web1_jason host=[192.168.5.6]
    Nov  7 16:10:51 localhost imapd[1817]: Command stream end of file, while reading line user=web1_jason host=[192.168.5.6]
    Nov  7 16:10:51 localhost imapd[1818]: imap service init from 192.168.5.6
    Nov  7 16:10:51 localhost imapd[1818]: Login user=jason host=[192.168.5.6]
    Nov  7 16:10:51 localhost imapd[1818]: Logout user=jason host=[192.168.5.6]
    Nov  7 16:10:51 localhost imapd[1819]: imap service init from 192.168.5.6
    Nov  7 16:10:51 localhost imapd[1819]: Login user=jason host=[192.168.5.6]
    Nov  7 16:10:51 localhost imapd[1819]: Connection reset by peer, while reading line user=jason host=[192.168.5.6]
    Nov  7 16:10:51 localhost imapd[1820]: imap service init from 192.168.5.6
    Nov  7 16:10:51 localhost imapd[1820]: Login user=web1_jenson host=[192.168.5.6]
    Nov  7 16:10:51 localhost imapd[1820]: Logout user=web1_jenson host=[192.168.5.6]
    Nov  7 16:10:52 localhost imapd[1821]: imap service init from 192.168.5.6
    Nov  7 16:10:52 localhost imapd[1821]: Login user=web1_jenson host=[192.168.5.6]
    Nov  7 16:10:52 localhost imapd[1736]: Killed (lost mailbox lock) user=web1_jenson host=[192.168.5.6]
    Nov  7 16:10:53 localhost imapd[1822]: imap service init from 192.168.5.6
    Nov  7 16:10:53 localhost imapd[1822]: Login user=web1_jason host=[192.168.5.6]
    Nov  7 16:10:53 localhost imapd[1821]: Command stream end of file, while reading line user=web1_jenson host=[192.168.5.6]
    Thanks again....
     
    Last edited: Nov 8, 2005
  6. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's in /etc/postfix/virtusertable?
     
  7. jash

    jash New Member

    My virtusertable

    Code:
    ###################################
    #
    # ISPConfig virtusertable Configuration File
    #         Version 1.0
    #
    ###################################
    [email]jason@www.jherrick.co.uk[/email]    web1_jason
    [email]web1_jason@www.jherrick.co.uk[/email]    web1_jason
    [email]jason@jherrick.co.uk[/email]    web1_jason
    [email]web1_jason@jherrick.co.uk[/email]    web1_jason
    [email]jenson@www.jherrick.co.uk[/email]    web1_jenson
    [email]web1_jenson@www.jherrick.co.uk[/email]    web1_jenson
    [email]jenson@jherrick.co.uk[/email]    web1_jenson
    [email]web1_jenson@jherrick.co.uk[/email]    web1_jenson
    #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
    I can now guess I need to add all email accounts to this file....

    1) Does this need to be all variations of email address?

    2) Is there a better way to set up my other email providers to make this process more automated!!!! Such as co-domain??

    3) I guess I could also remove the web1_ part from the above and have all mail forwarded to the use jason ???

    Thanks again for your help......I am learning slowly but surely!!

    UPDATE

    I have restarted postfix after changing Virtusertable , still not going to web1_jason but mail log now has

    Nov 7 17:14:01 localhost postfix/trivial-rewrite[3554]: warning: database /etc/postfix/virtusertable.db is older than source file /etc/postfix/virtusertable
     
    Last edited: Nov 8, 2005
  8. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Normally you don't use email addresses like jason@www.jherrick.co.uk, but ISPConfig writes them anyway because from time to time there's someone who needs that feature.

    Yes, you can use the Co-Domains.

    Therefore you'd have to change the file manually, but your changes would be overwritten by ISPConfig when it runs the next time. So don't edit that file (unless you edit it below the line #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####)! :eek:
    But you could create an alias in /etc/aliases and make emails for web1_jason go to jason. After you've changed /etc/aliases, you must run
    Code:
    newaliases
    You must run
    Code:
    postmap /etc/postfix/virtusertable
    after you change that file. But you shouldn't change it manually, as I've mentioned above.
     
  9. jash

    jash New Member

    Thanks for the latest info, it has certainly helped my understanding. I did as instructed "postmap /etc/postfix/virtusertable" and I also restarted postfix before testing my mail.
    It is still going via my linux user 'jason' rather than 'web1_jason' as instructed in "/etc/postfix/virtusertable"

    My amended virtusertable is now

    Code:
    ###################################
    #
    # ISPConfig virtusertable Configuration File
    #         Version 1.0
    #
    ###################################
    jason@www.jherrick.co.uk    web1_jason
    web1_jason@www.jherrick.co.uk    web1_jason
    jason@jherrick.co.uk    web1_jason
    web1_jason@jherrick.co.uk    web1_jason
    jenson@www.jherrick.co.uk    web1_jenson
    web1_jenson@www.jherrick.co.uk    web1_jenson
    jenson@jherrick.co.uk    web1_jenson
    web1_jenson@jherrick.co.uk    web1_jenson
    #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
    jash@enact.freeserve.co.uk    web1_jason
    jason@enact.freeserve.co.uk    web1_jason
    jasonherrick@hotpop.com    web1_jason
    jasonherrick@btinternet.com    web1_jenson
    I even altered the final setting to forward to web1_jenson as an extra test. All mail went direct to mailbox of 'Jason'
    At least all my mail is arriving in a mailbox, rather than going missing.....just need to fix this routing problem!
     
    Last edited: Nov 8, 2005
  10. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    This happens because your emails get mapped to jason@localhost.linuxserver (see your mail logs). As I suggested before, create an alias in /etc/aliases.
     
  11. jash

    jash New Member

    Falko,

    Thanks again, but maybe a slight misunderstanding....I am looking to capture several users external mail through fetchmail, postfix and ISP Config to then deliver to each user.

    I am aware that somehow the 'web1_jason' is obviously going to linux user 'jason' but I am concerned this will continue to happen whereby user 'jason' will recieve all other users mail - As has happened when I altered the Fetchmailrc script to forward to 'web1_jenson' - It still came to user 'jason'

    Just trying to understand what is going on and why/how it forwards to 'jason' when told by the fetchmailrc file to go to 'web1_jason' or 'web1_jenson'. It seems to be ignoring this file.....

    Also there is no entry as yet in the etc/aliases re 'web1_jason'
    I will bear this in mind to map other users should they wish to send everything via the linux user name!
     

Share This Page