Trying to use ISPConfig with remote SMTP on sharedhosting

Discussion in 'Installation/Configuration' started by Robert Craig, Jul 26, 2023.

  1. Robert Craig

    Robert Craig New Member

    Hi,
    Love this product for sure but I have a small but very frustrating problem I am hoping there is a simple answer for. I have a domain and sub domain website on ispconfig in a VPS and it is working great. But the email server is still on my original shared hosting platform and I would like to keep the email service there.

    Is there a simple approach to achieving this as I just cannot seem to get the correct config in place to make it work. when I check /etc/mail.log all I see is email bounced.

    Jul 26 11:29:36 cp postfix/local[7099]: 3997280A90: to=<[email protected]>, relay=local, delay=0.34, delays=0.32/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "info")

    I think it is because the postfix server is trying to handle it locally? Is there a way to get it to use my original email server in shared hosting?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The solution is really easy as email and web services in ISPConfig are separated so that you can keep your email system in another system without problems. All you have to do is delete the email domain (not the website) first4frames.co.uk in ISPConfig.
     
  3. Robert Craig

    Robert Craig New Member

    ah I fear then I have screwed up somewhere as there is no email config whatsoever in the ispconfig interface :(
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe you used a wrong hostname then in the system, the hostname must be a subdomain like server1.first4frames.co.uk, if you would have used just first4frames.co.uk then this will cause trouble for this domain. Please post the result of these command:

    hostname
    hostname -f
    cat /etc/mailname
    grep first4frames.co.uk /etc/postfix/main.cf
     
  5. Robert Craig

    Robert Craig New Member

    root@cp:/etc/postfix# hostname
    cp
    root@cp:/etc/postfix# hostname -f
    cp.first4frames.co.uk
    root@cp:/etc/postfix# cat /etc/mailname
    first4frames.co.uk
    root@cp:/etc/postfix# grep first4frames.co.uk /etc/postfix/main.cf
    myhostname = cp.first4frames.co.uk
    mydestination = $myhostname, first4frames.co.uk, cp.first4frames.co.uk, localhost.first4frames.co.uk, localhost
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I think you need to change /etc/mailname to cp.first4frames.co.uk.
     
  7. Robert Craig

    Robert Craig New Member

    Tried this and it shows this in the log


    Jul 26 12:02:54 cp postfix/pickup[2067]: 0E42580CE9: uid=0 from=<root>
    Jul 26 12:02:54 cp postfix/cleanup[2300]: 0E42580CE9: message-id=<[email protected]>
    Jul 26 12:02:54 cp postfix/qmgr[2068]: 0E42580CE9: from=<[email protected]>, size=323, nrcpt=1 (queue active)
    Jul 26 12:02:54 cp postfix/local[2307]: 0E42580CE9: to=<[email protected]>, relay=local, delay=0.25, delays=0.22/0.01/0/0.02, dsn=5.1.1, status=bounced (unknown user: "info")
    Jul 26 12:02:54 cp postfix/cleanup[2300]: 47E1680CEB: message-id=<[email protected]>
    Jul 26 12:02:54 cp postfix/bounce[2308]: 0E42580CE9: sender non-delivery notification: 47E1680CEB
    Jul 26 12:02:54 cp postfix/qmgr[2068]: 47E1680CEB: from=<>, size=2174, nrcpt=1 (queue active)
    Jul 26 12:02:54 cp postfix/cleanup[2300]: 4B2D180AE2: message-id=<[email protected]>
    Jul 26 12:02:54 cp postfix/local[2307]: 47E1680CEB: to=<[email protected]>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
    Jul 26 12:02:54 cp postfix/qmgr[2068]: 47E1680CEB: removed
    Jul 26 12:02:54 cp postfix/bounce[2309]: 0E42580CE9: sender delivery status notification: 4B2D180AE2
    Jul 26 12:02:54 cp postfix/qmgr[2068]: 4B2D180AE2: from=<>, size=1964, nrcpt=1 (queue active)
    Jul 26 12:02:54 cp postfix/qmgr[2068]: 0E42580CE9: removed
    Jul 26 12:02:54 cp postfix/local[2307]: 4B2D180AE2: to=<[email protected]>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
    Jul 26 12:02:54 cp postfix/qmgr[2068]: 4B2D180AE2: removed
     
  8. Robert Craig

    Robert Craig New Member

    many thanks for the heads up it turned out to be both the mailname and mydestination and dns. its now working - thank you so much for this
     
    ahrasis and till like this.

Share This Page