Loads of Probs, Fresh OpenSuSE Install

Discussion in 'Installation/Configuration' started by samuch, Apr 20, 2009.

  1. samuch

    samuch New Member

    I followed the install guide to a T and just went to setup the first site. After creating the client, site, and email domain, nothing appears to work.

    The website content does not come up and gives me a 404 page even though I made sure to put the site content in the created folder:
    /srv/www/domainname.com

    Also, the email does not work for the one account I created. The last mail err log shows:

    Apr 19 15:47:07 web postfix/postmap[3652]: fatal: open /etc/postfix/virtusertable: No such file or directory

    I can login to the email account with squirrelmail but when I go to send mail it says:

    Transaction failed
    554 5.7.1 <[email protected]>: Relay access denied

    What am I possibly missing? In version 2 I would have to do /etc/init.d/ispconfig restart when something like this happened. However I see that doesn't exist anymore.

    Please help!
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You must put it into /srv/www/domainname.com/web.

    What's in /etc/postfix/main.cf?
     
  3. samuch

    samuch New Member

    The website issue was fixed by going into the admin page and specifying the public IP under the System > Edit Server IP page and then going into the site properties and specifying that IP address in the dropdown instead of the *.

    For the mail, in my main.cf I have the following (minus the comments):

    Code:
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/lib/postfix
    data_directory = /var/lib/postfix
    mail_owner = postfix
    unknown_local_recipient_reject_code = 550
    debug_peer_level = 2
    sendmail_path = /usr/sbin/sendmail
    
    newaliases_path = /usr/bin/newaliases
    mailq_path = /usr/bin/mailq
    setgid_group = maildrop
    html_directory = /usr/share/doc/packages/postfix-doc/html
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/packages/postfix-doc/samples
    readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
    inet_protocols = all
    biff = no
    mail_spool_directory = /var/mail
    canonical_maps = hash:/etc/postfix/canonical
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_alias_domains =
    relocated_maps = hash:/etc/postfix/relocated
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    sender_canonical_maps = hash:/etc/postfix/sender_canonical
    masquerade_exceptions = root
    masquerade_classes = envelope_sender, header_sender, header_recipient
    myhostname = my.domain.com
    delay_warning_time = 1h
    message_strip_characters = \0
    program_directory = /usr/lib/postfix
    inet_interfaces = all
    masquerade_domains =
    mydestination = my.domain.com, localhost, localhost.localdomain
    defer_transports =
    mynetworks_style = subnet
    disable_dns_lookups = no
    relayhost =
    mailbox_command =
    mailbox_transport =
    strict_8bitmime = no
    disable_mime_output_conversion = no
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_helo_required = no
    smtpd_helo_restrictions =
    strict_rfc821_envelopes = no
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
    smtp_sasl_auth_enable = no
    smtpd_sasl_auth_enable = yes
    smtpd_use_tls = yes
    smtp_use_tls = no
    alias_maps = hash:/etc/aliases
    mailbox_size_limit = 0
    message_size_limit = 0
    mynetworks = 127.0.0.0/8
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_tls_security_level = may
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    virtual_create_maildirsize = yes
    virtual_maildir_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = maildrop
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    
    
     
  4. Rune

    Rune New Member

    I know next to nothing about ISPConfig, but I have configured postfix servers before and these lines below jumped out at me mate

    Code:
    myhostname = my.domain.com
    mydestination = my.domain.com, localhost, localhost.localdomain
    Unless the domain pointing to your machine is actually called my.domain.com those aren't really going to work

    These are what I generally use and they've always worked well enough:
    Code:
    myhostname = mail.your-proper-domain-name.com
    mydomain = your-proper-domain-name.com
    myorigin = $mydomain
    mydestination = $mydomain, $myhostname, localhost, localhost.$mydomain
    myhostname is the hostname of the mail server as defined in your dns mx records, mydomain is the domain pointing to the machine

    If your domain were samuch.com you would replace your-proper-domain-name.com in the above lines to say that, something like this:

    myhostname = mail.samuch.com


    There may be other things, those are just what jumped out at me, there is one other thing I generally define that you don't have though

    You have: inet_protocols = all

    It's fairly common to also have: inet_interfaces = all

    You don't have it, not sure exactly what differences ispconfig uses compared to a 'normal' main.cf but it would be worth you trying the above

    Can't even get the ispconfig to install on my machine but I thought I'd check out your thread as I'm also using suse ... best of luck mate, you're already having more of it than I am so far
     
  5. samuch

    samuch New Member

    For my mail issues, when emailing the accounts the bouncebacks show user unknown errors.

    If I do 'maildrop -d [email protected]' it reports "Invalid user specified".

    So is it possible that ISPConfig isn't updating the virtual user tables properly? If not, how can I force it to do this so I can get the mail flowing again?

    My /etc/postfix/master.cf is as follows:

    Code:
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp      inet  n       -       n       -       -       smtpd
    #submission inet n      -       n       -       -       smtpd
    #       -o smtpd_etrn_restrictions=reject
    #       -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #smtps    inet  n       -       n       -       -       smtpd -o smtpd_tls_wrappermode=yes
    #  -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
    #submission   inet    n       -       n       -       -       smtpd
    #  -o smtpd_etrn_restrictions=reject
    #  -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
    #628      inet  n       -       n       -       -       qmqpd
    pickup    fifo  n       -       n       60      1       pickup
    cleanup   unix  n       -       n       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr
    #qmgr     fifo  n       -       n       300     1       oqmgr
    #tlsmgr    unix  -       -       n       1000?   1       tlsmgr
    rewrite   unix  -       -       n       -       -       trivial-rewrite
    bounce    unix  -       -       n       -       0       bounce
    defer     unix  -       -       n       -       0       bounce
    trace     unix  -       -       n       -       0       bounce
    verify    unix  -       -       n       -       1       verify
    flush     unix  n       -       n       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    smtp      unix  -       -       n       -       -       smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay     unix  -       -       n       -       -       smtp
            -o fallback_relay=
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       n       -       -       showq
    error     unix  -       -       n       -       -       error
    discard   unix  -       -       n       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       n       -       -       lmtp
    anvil     unix  -       -       n       -       1       anvil
    #localhost:10025 inet   n       -       n       -       -       smtpd -o content_filter=
    scache    unix  -       -       n       -       1       scache
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent.  See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=R user=vmail argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}
    cyrus     unix  -       n       n       -       -       pipe
      user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
    procmail  unix  -       n       n       -       -       pipe
      flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
    retry     unix  -       -       n       -       -       error
    proxywrite unix -       -       n       -       1       proxymap
    
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
    
    127.0.0.1:10025 inet n - - - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtpd_bind_address=127.0.0.1
    
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Can you change
    Code:
    maildrop  unix  -       n       n       -       -       pipe
      flags=R user=vmail argv=/usr/bin/maildrop [B]-d ${recipient}[/B] ${extension} ${recipient} ${user} ${nexthop} ${sender}
    to
    Code:
    maildrop  unix  -       n       n       -       -       pipe
      flags=R user=vmail argv=/usr/bin/maildrop [B]-d vmail[/B] ${extension} ${recipient} ${user} ${nexthop} ${sender}
    and restart Postfix?
     
  7. samuch

    samuch New Member

    That gets me a bit closer. The email doesn't immediately bounce back and if I check the maul-queue from the web interface it shows the following:

    Code:
    -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
    0303C2DA219 2243 Tue Apr 21 09:33:10 [email protected]
    (temporary failure. Command output: /usr/bin/maildrop: Error opening /etc/maildroprc.)
    [email protected]
    
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Looks as if your maildrop binary is not fully installed. The file /etc/maildroprc is not used or changed by ispconfig, it must be part of te maldrop package of your linux distribution. You should try to uninstall and then reinstall maildrop.
     
  9. samuch

    samuch New Member

  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Please enable smtp authentication in your email client.
     
  11. samuch

    samuch New Member

    I was just testing with Squirrelmail on the actual server. I had installed it just like the install guide said. Is there a separate spot you have to enable authentication for Squirrelmail? I assumed that was handled by the initial login to it.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the mynetworks line from postfix main.cf
     
  13. samuch

    samuch New Member

    The two lines that say anything about mynetworks are

    Code:
    mynetworks_style = subnet
    mynetworks = 127.0.0.0/8
    
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    then you should be able to connect with squirrelmail without using authentication as long as you configured squirrelmail to connect to the smtp server on localhost or 127.0.0.1 and not any other hostname or IP.
     
  15. samuch

    samuch New Member

    Squirrelmail is set to use localhost. The logs also show the connection coming from localhost:

    Code:
    Apr 22 04:37:50 web postfix/smtpd[27199]: connect from localhost[::1]
    Apr 22 04:37:50 web postfix/smtpd[27199]: NOQUEUE: reject: RCPT from localhost[::1]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<address.com>
    Apr 22 04:37:50 web postfix/smtpd[27199]: lost connection after RCPT from localhost[::1]
    
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Your server uses ipv6 while postfix is configured in mynetworks for ipv4 only. Change the mynetworks line to:

    mynetworks = 127.0.0.0/8 [::1]/128

    and restart postfix.
     
  17. samuch

    samuch New Member

    Once again, you are the best! That was the issue.

    I completely forgot that OpenSuSE, by default, sets up IPV6.

    Thanks for your patience! Now onto moving these sites over.
     
  18. reason8

    reason8 Member

    Hello and good morning. I am having the same problem. I am using Opensuse 11.1 also and I have changed my networks to reflect ipv 6. SquirrelMail now sends the email and doesn't give me the relay error but I am not receiving the email message sent. I am also having the same problem with my thunderbird email client. The logs show the following:

    [This is the time frame of the email sent]

    May 5 02:17:07 isp postfix/smtpd[4942]: connect from unknown[59.92.14.169]
    May 5 02:17:08 isp postfix/smtpd[4942]: 33C0676689: client=unknown[59.92.14.169]
    May 5 02:17:08 isp postfix/cleanup[4954]: 33C0676689: message-id=<000d01c9cd62$2b5e01c0$6400a8c0@yoknapatawpharg61>
    May 5 02:17:09 isp postfix/qmgr[4402]: 33C0676689: from=, size=2803, nrcpt=1 (queue active)
    May 5 02:17:09 isp clamd[19973]: SelfCheck: Database status OK.
    May 5 02:17:09 isp postfix/smtpd[4942]: disconnect from unknown[59.92.14.169]
    May 5 02:17:13 isp postfix/smtp[4955]: 33C0676689: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=5.8, delays=0.94/0.05/0.02/4.8, dsn=2.5.0, status=sent (250 2.5.0 Ok, id=32552-20, DISCARD(bounce.suppressed))
    May 5 02:17:13 isp postfix/qmgr[4402]: 33C0676689: removed
    May 5 02:17:42 isp postfix/smtpd[4942]: connect from unknown[123.238.74.133]
    May 5 02:17:42 isp postfix/smtpd[4942]: D77F876689: client=unknown[123.238.74.133]
    May 5 02:17:43 isp postfix/cleanup[4954]: D77F876689: message-id=<000d01c9cd62$45afad80$6400a8c0@vizorsg1>
    May 5 02:17:43 isp postfix/qmgr[4402]: D77F876689: from=, size=1800, nrcpt=1 (queue active)
    May 5 02:17:43 isp postfix/smtpd[4942]: disconnect from unknown[123.238.74.133]
    May 5 02:17:50 isp postfix/smtp[4955]: D77F876689: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=7.6, delays=0.6/0/0.04/7, dsn=2.5.0, status=sent (250 2.5.0 Ok, id=04680-01, DISCARD(bounce.suppressed))
    May 5 02:17:50 isp postfix/qmgr[4402]: D77F876689: removed
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Make sure that you allow also ipv6 connections from the ipv6 localhost IP network in the mynetwork setting in main.cf and not just from the ipv4 127.0.0.1 network.
     
  20. reason8

    reason8 Member

    Where do I add this in /etc/postfix/main.cf?
     

Share This Page