Page 46 of 51 FirstFirst ... 364445464748 ... LastLast
Results 451 to 460 of 506

Thread: Howto: set up a mail server in Ubuntu

  1. #451
    Join Date
    Jun 2012
    Beans
    1

    Re: Howto: set up a mail server in Ubuntu

    Also, when configuring SASL in Ubuntu 12.04 in /etc/postfix/sasl/smtpd.conf "sql_passw" should be "sql_passwd".

  2. #452
    Join Date
    Sep 2011
    Beans
    31

    Re: Howto: set up a mail server in Ubuntu

    Quote Originally Posted by sprior View Post
    Just FYI is anyone is trying to follow the Flurdy guide with Ubuntu 11.* to 12.04, there is one change I noticed that needed to be made to the section on setting up SASL.

    In the file:
    /etc/postfix/sasl/smtpd.conf

    the line:
    auxprop_plugin: mysql

    needs to be changed to:
    auxprop_plugin: sql
    How successful did you follow the current Flurdy guide to build for 12.04 ? I'm trying to, but not sure if ALL info can apply to 12.04 lts server !

    Another question: do you know if the Flurdy guide can apply to build for a Local domain in which the existing Linux users have their own mailboxes in ~/Maildir for example (Not the Virtual domain) ?

  3. #453
    Join Date
    Sep 2011
    Beans
    1

    Re: Howto: set up a mail server in Ubuntu

    Hi,

    I have followed this guide up until the point where it is strongly suggested that we test everything thoroughly before continuing.


    I can send mail to any domain on my local network and it works, however, if I try to send mail to a domain outside my network I just see errors in mail.log that say:

    No route to host.

    any help would be greatly appreciated.

    Thank you,
    -Jason

  4. #454
    Join Date
    Aug 2012
    Beans
    1

    Re: Howto: set up a mail server in Ubuntu

    Hi,

    I installed the mail server following your advices and everything is working perfectly excepting one stuff : imap attachment downloads. There are very slow. With pop or squirrel it's ok and speed is normal but with imap even for one mega it took too much time and then the connection times out.

    Did you already meet this problem? Thanks for help!

    Tim from agiom.

  5. #455
    Join Date
    Dec 2009
    Beans
    2

    Re: Howto: set up a mail server in Ubuntu

    Quote Originally Posted by j_data View Post
    Hi,
    I can send mail to any domain on my local network and it works, however, if I try to send mail to a domain outside my network I just see errors in mail.log that say:

    No route to host.
    It's been a while, so you've probably already solved your problem, but that looks likely to be a problem with your networking in general, rather than Postfix in particular.

    In this case you could try testing your networking by running:

    Code:
    ping google.com
    from the command line, if the everything is working there should be a response. Next I would try editing /etc/postfix/master.cf and change the smtp line so it looks like this:

    Code:
    smtp      inet  n       -       -       -       -       smtpd -v
    Save and restart Postfix, try to send the mail again, then check mail.log for the output, that may include some clues as to what went wrong.

  6. #456
    Join Date
    Oct 2010
    Location
    Mount Juliet, Tennessee
    Beans
    44
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Howto: set up a mail server in Ubuntu

    Aside from posts http://ubuntuforums.org/showpost.php...&postcount=450 and http://ubuntuforums.org/showpost.php...&postcount=450

    Has anyone had success with the 10th edition of http://flurdy.com/docs/postfix/index.html using Ubuntu Server 12.04 LTS?

    If so, are there any additional steps or 'gotchas' to be aware of?

    And, is there a link to the 11th edition (draft) on the flurdy site (above)?

    Thanks,

    Jones

  7. #457
    Join Date
    Oct 2007
    Beans
    4

    Re: Howto: set up a mail server in Ubuntu

    So I've followed the guide as well, and everything seems to work except for one thing.

    I cannot send mails from the server when I have

    -o smtpd_client_restrictions=permit_sasl_authenticate d,reject

    in /etc/postfix/master.cf. Buf if I remove the ',reject' part:

    -o smtpd_client_restrictions=permit_sasl_authenticate d

    then I can send mails. /var/log/mail.log states:

    Code:
    postfix/smtpd[8346]: connect from localhost[127.0.0.1]
    postfix/smtpd[8346]: Anonymous TLS connection established from localhost[127.0.0.1]: TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
    postfix/smtpd[8346]: E4BDA62BD: client=localhost[127.0.0.1]
    postfix/cleanup[8351]: E4BDA62BD: message-id=<6258d6190d2ece5e505c78b4d0894c84@blablabla.com>
    postfix/qmgr[8340]: E4BDA62BD: from=<oguz286@blablabla.com>, size=700, nrcpt=1 (queue active)
    postfix/smtpd[8346]: disconnect from localhost[127.0.0.1]
    imapd-ssl: LOGOUT, user=oguz286@localhost, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=696, sent=654, time=1, starttls=1
    postfix/smtp[8354]: E4BDA62BD: to=<bla@gmail.com>, relay=gmail-smtp-in.l.google.com[2a00:1450:400c:c03::1a]:25, delay=0.87, delays=0.24/0.05/0.13/0.45, dsn=2.0.0, status=sent (250 2.0.0 OK 1357083867 w5si63967327wjx.48)
    postfix/qmgr[8340]: E4BDA62BD: removed
    As you can see an anonymous TLS connection is being made, whereas I thought that that my mail user should 'login' and authenticate.

    With the reject part, mail.log contains:

    Code:
    imapd-ssl: Connection, ip=[::ffff:127.0.0.1]
    imapd-ssl: LOGIN, user=oguz286@localhost, ip=[::ffff:127.0.0.1], port=[52331], protocol=IMAP
    postfix/smtpd[8050]: connect from localhost[127.0.0.1]
    postfix/smtpd[8050]: Anonymous TLS connection established from localhost[127.0.0.1]: TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
    postfix/smtpd[8050]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 554 5.7.1 <localhost[127.0.0.1]>: Client host rejected: Access denied; from=<oguz286@blablabla.com> to=<bla@gmail.com> proto=ESMTP helo=<blablabla.com>
    postfix/smtpd[8050]: disconnect from localhost[127.0.0.1]
    Hours of searching on the web got me nowhere Does anyone have a clue as what's going on here?

  8. #458
    Join Date
    Mar 2013
    Beans
    3

    Re: Howto: set up a mail server in Ubuntu

    If this is logged when you try to send from roundcube then you need to set following things:
    vi /etc/roundcube/main.inc.php
    $rcmail_config['smtp_server'] = 'ssl://localhost';
    $rcmail_config['smtp_port'] = 465;
    $rcmail_config['smtp_user'] = '%u';
    $rcmail_config['smtp_pass'] = '%p';


    Hope this will help.

  9. #459
    Join Date
    Mar 2013
    Beans
    3

    Re: Howto: set up a mail server in Ubuntu

    Has anyone installed PostVis Admin in addition of this tutorial?

  10. #460
    Join Date
    Mar 2011
    Beans
    9

    Re: Howto: set up a mail server in Ubuntu

    Hi All--I followed Flurdy's guide for Ubuntu 12.04, though I have Ubuntu 12.10 64-bit. Everything works but I cannot send from a mail client or Squirrelmail. I've been tweaking and googling and tail-ing logs for a solid week and can't crack it, so I'm hoping you folks can help me out.

    My /etc/postfix/main.cf:

    # See /usr/share/postfix/main.cf.dist for a commented, more complete version


    # Debian specific: Specifying a file name will cause the first
    # line of that file to be used as the name. The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname

    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no

    # appending .domain is the MUA's job.
    append_dot_mydomain = no

    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h

    readme_directory = no

    # TLS parameters
    smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_use_tls=yes
    #smtpd_use_tls=no
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.

    myhostname = mail.me.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = me.com
    mydestination = mail.me.com, me-main.Datian, localhost.Datian, localhost
    #mydestination =
    #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    relayhost =
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128,192.168.2.0/24
    mailbox_command =
    mailbox_size_limit = 30000000
    recipient_delimiter = +
    inet_interfaces = all

    masquerade_domains = mail.me.com
    local_recipient_maps =

    # how long if undelivered before sending warning update to sender
    delay_warning_time = 4h
    # will it be a permanent error or temporary
    unknown_local_recipient_reject_code = 450
    # how long to keep message on queue before return as failed.
    # some have 3 days, I have 16 days as I am backup server for some people
    # whom go on holiday with their server switched off.
    maximal_queue_lifetime = 7d
    # max and min time in seconds between retries if connection failed
    minimal_backoff_time = 1000s
    maximal_backoff_time = 8000s
    # how long to wait when servers connect before receiving rest of data
    smtp_helo_timeout = 60s
    # how many address can be used in one message.
    # effective stopper to mass spammers, accidental copy in whole address list
    # but may restrict intentional mail shots.
    smtpd_recipient_limit = 16
    # how many error before back off.
    smtpd_soft_error_limit = 3
    # how many max errors before blocking it.
    smtpd_hard_error_limit = 12

    # Requirements for the HELO statement
    smtpd_helo_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_hostname,
    reject_invalid_hostname, permit
    # Requirements for the sender details
    smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
    # Requirements for the connecting server
    smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org,
    reject_rbl_client blackholes.easynet.nl,
    reject_rbl_client dnsbl.njabl.org
    # Requirement for the recipient address
    smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_pipelining,
    reject_non_fqdn_recipient, reject_unknown_recipient_domain,
    reject_unauth_destination, permit
    smtpd_data_restrictions = reject_unauth_pipelining

    # require proper helo at connections
    smtpd_helo_required = yes
    # waste spammers time before rejecting them
    smtpd_delay_reject = yes
    disable_vrfy_command = yes

    # not sure of the difference of the next two
    # but they are needed for local aliasing
    alias_maps = hash:/etc/postfix/aliases
    alias_database = hash:/etc/postfix/aliases
    # this specifies where the virtual mailbox folders will be located
    virtual_mailbox_base = /var/spool/mail/virtual
    # this is for the mailbox location for each user
    virtual_mailbox_maps = mysql:/etc/postfix/mysql_mailbox.cf
    # and this is for aliases
    virtual_alias_maps = mysql:/etc/postfix/mysql_alias.cf
    # and this is for domain lookups
    virtual_mailbox_domains = mysql:/etc/postfix/mysql_domains.cf
    # this is how to connect to the domains (all virtual, but the option is there)
    # not used yet
    # transport_maps = mysql:/etc/postfix/mysql_transport.cf

    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    home_mailbox = Maildir/


    #SASL
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_type = cyrus
    #smtpd_sasl_path=/etc/postfix/sasl:/usr/lib/sasl2
    smtpd_sasl_path= smtpd
    # If your potential clients use Outlook Express or other older clients
    # this needs to be set to yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_security_options = noanonymous
    smtpd_sasl_local_domain =

    #SCP: adding this to try to correct ERROR: IMAP dropped the connection
    mailbox_transport = virtual

    my /etc/postfix/master.cf:

    #
    # Postfix master process configuration file. For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # ================================================== ========================
    # service type private unpriv chroot wakeup maxproc command + args
    # (yes) (yes) (yes) (never) (100)
    # ================================================== ========================
    smtp inet n - n - - smtpd
    #submission inet n - - - - smtpd
    # -o smtpd_tls_security_level=encrypt
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
    # -o milter_macro_daemon_name=ORIGINATING
    #smtps inet n - - - - smtpd
    # -o smtpd_tls_wrappermode=yes
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
    # -o milter_macro_daemon_name=ORIGINATING
    #628 inet n - - - - qmqpd
    pickup fifo n - - 60 1 pickup
    cleanup unix n - - - 0 cleanup
    qmgr fifo n - n 300 1 qmgr
    #qmgr fifo n - - 300 1 oqmgr
    tlsmgr unix - - - 1000? 1 tlsmgr
    rewrite unix - - - - - trivial-rewrite
    bounce unix - - - - 0 bounce
    defer unix - - - - 0 bounce
    trace unix - - - - 0 bounce
    verify unix - - - - 1 verify
    flush unix n - - 1000? 0 flush
    proxymap unix - - n - - proxymap
    proxywrite unix - - n - 1 proxymap
    smtp unix - - y - - smtp -v
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay unix - - y - - smtp
    -o smtp_fallback_relay=
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - - - - showq
    error unix - - - - - error
    retry unix - - - - - error
    discard unix - - - - - discard
    local unix - n n - - local
    virtual unix - n n - - virtual
    lmtp unix - - - - - lmtp
    anvil unix - - - - 1 anvil
    scache unix - - - - 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=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
    #
    # ================================================== ==================
    #
    # Recent Cyrus versions can use the existing "lmtp" master.cf entry.
    #
    # Specify in cyrus.conf:
    # lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
    #
    # Specify in main.cf one or more of the following:
    # mailbox_transport = lmtp:inet:localhost
    # virtual_transport = lmtp:inet:localhost
    #
    # ================================================== ==================
    #
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in main.cf: cyrus_destination_recipient_limit=1
    #
    #cyrus unix - n n - - pipe
    # user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    #
    # ================================================== ==================
    # Old example of delivery via Cyrus.
    #
    #old-cyrus unix - n n - - pipe
    # flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    #
    # ================================================== ==================
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp unix - n n - - pipe
    flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    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=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix - n n - 2 pipe
    flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    mailman unix - n n - - pipe
    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
    ${nexthop} ${user}

    submission inet n - y - - smtpd
    -o smtpd_sasl_auth_enable=yes
    # if you do not want to restrict it encryption only, comment out next line<
    -o smtpd_tls_auth_only=yes
    # -o smtpd_tls_security_level=encrypt
    # -o header_checks=
    # -o body_checks=<
    -o smtpd_client_restrictions=permit_sasl_authenticate d,reject_unauth_destination,reject
    -o smtpd_sasl_security_options=noanonymous,noplaintex t
    -o smtpd_sasl_tls_security_options=noanonymous
    # -o milter_macro_daemon_name=ORIGINATING<
    smtps inet n - y - - smtpd
    -o smtpd_tls_wrappermode=yes
    -o smtpd_sasl_auth_enable=yes
    -o smtpd_tls_auth_only=yes
    -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
    -o smtpd_sasl_security_options=noanonymous,noplaintex t
    -o smtpd_sasl_tls_security_options=noanonymous
    # -o milter_macro_daemon_name=ORIGINATING
    #smtp inet n - n - 1 postscreen
    #smtpd pass - - n - - smtpd
    #dnsblog unix - - n - 0 dnsblog
    #tlsproxy unix - - n - 0 tlsproxy

    My /etc/postfix/sasl/smtp.conf:

    pwcheck_method: saslauthd
    #mech_list: plain login pam
    #mech_list: plain login
    mech_list: plain login cram-md5 digest-md5
    #saslauthd_path: /var/run/saslauthd/mux
    #saslauthd_path: /var/spool/postfix/var/run/saslauthd/mux
    #authdaemond_path: /var/spool/authdaemon/socket
    log_level: 7
    allow_plaintext: true
    auxprop_plugin: sql
    #auxprop_plugin: mysql
    sql_engine: mysql
    sql_hostnames: localhost
    #sql_hostnames: 127.0.0.1
    sql_user: mail
    #sql_passw: password
    sql_passwd: password
    sql_database: maildb
    #sql_select: select crypt from users where id='%u@%r' and enabled=1
    sql_select: select crypt from users where id='%u' and enabled=1

    My /var/log/mail.log:

    Apr 15 14:07:18 me-main postfix/smtpd[18339]: connect from dsl081-198-066.nyc2.dsl.isp.net[8.8.8.8]
    Apr 15 14:07:23 me-main postfix/smtpd[18339]: warning: dsl081-198-066.nyc2.dsl.isp.net[8.8.8.8]: SASL PLAIN authentication failed: generic failure
    Apr 15 14:07:25 me-main postfix/smtpd[18339]: disconnect from dsl081-198-066.nyc2.dsl.isp.net[8.8.8.8]
    Apr 15 14:10:45 me-main postfix/anvil[18341]: statistics: max connection rate 1/60s for (submission:8.8.8.8) at Apr 15 14:07:18
    Apr 15 14:10:45 me-main postfix/anvil[18341]: statistics: max connection count 1 for (submission:8.8.8.8) at Apr 15 14:07:18
    Apr 15 14:10:45 me-main postfix/anvil[18341]: statistics: max cache size 1 at Apr 15 14:07:18

    My /var/log/auth.log:

    Apr 15 14:07:23 me-main postfix/smtpd[18339]: sql plugin trying to open db 'maildb' on host 'localhost'
    Apr 15 14:07:23 me-main postfix/smtpd[18339]: sql plugin could not connect to host localhost
    Apr 15 14:07:23 me-main postfix/smtpd[18339]: sql plugin couldn't connect to any host
    Apr 15 14:07:23 me-main postfix/smtpd[18339]: sql plugin Parse the username user@me.com
    Apr 15 14:07:23 me-main postfix/smtpd[18339]: sql plugin try and connect to a host
    Apr 15 14:07:23 me-main postfix/smtpd[18339]: sql plugin trying to open db 'maildb' on host 'localhost'
    Apr 15 14:07:23 me-main postfix/smtpd[18339]: sql plugin could not connect to host localhost
    Apr 15 14:07:23 me-main postfix/smtpd[18339]: sql plugin couldn't connect to any host

    I've read everything I can get my hands on from Falko Timme's threads, explored the possibility chroot being at the source of my troubles, and even tried downgrading sasl per an earlier guide for Ubuntu 11.10, but I'm getting nowhere. I'm really stumped, so any help would be much appreciated.
    Last edited by dakong27; April 15th, 2013 at 07:44 PM.

Page 46 of 51 FirstFirst ... 364445464748 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •