Page 29 of 50 FirstFirst ... 19272829303139 ... LastLast
Results 281 to 290 of 499

Thread: Howto: set up a mail server in Ubuntu

  1. #281
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,505
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Howto: set up a mail server in Ubuntu

    Quote Originally Posted by three_jeeps View Post
    A general question:
    Is there a version of the tutorial for 8.04 that describes how to set up an outgoing only mail server? (Ideally for ppl who have comcast or verizon as their ISP?)
    Ubuntu comes with an "outgoing" mail server installed by default - postfix.

    All you may need to do is:
    Code:
    sudo dpkg-reconfigure postfix
    and make sure it is set to "Internet", then edit the /etc/postfix/main.cf file with a relayhost (if you want your ISP's SMTP server to do the work).

    Set you mail clients to use your system for outgoing mail and it should work. Can't get much simpler than that.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  2. #282
    Join Date
    Jun 2007
    Location
    Porirua, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Howto: set up a mail server in Ubuntu

    Quote Originally Posted by mcfly1204 View Post
    I was struggling to get SASL working, and then noticed that the following command would simply hang.

    I proceeded to copy over my existing main.cf file with main.cf.debian, made all changes noted in the walkthrough, and the above command continues to hang. I can view the following in mail.log.


    **edit**
    Added main.cf and master.cf for reference.
    Is port 25 blocked from the machine you're running the telnet command on to your server?
    Forum DOs and DON'Ts
    Never assume that information you find using a search engine is up-to-date.

  3. #283
    Join Date
    Aug 2007
    Beans
    17

    Re: Howto: set up a mail server in Ubuntu

    Quote Originally Posted by lisati View Post
    Is port 25 blocked from the machine you're running the telnet command on to your server?
    No, port 25 is not blocked. I even ran iptables -F to flush all the rules. I feel my issue has to be connected to the two files I posted given postfix is bound to 25.

  4. #284

    Re: Howto: set up a mail server in Ubuntu

    i have got this error after i sent a mail:

    host ***[***] said: 550 Access denied
    - Invalid HELO name (See RFC2821 4.1.1.1) (in reply to MAIL FROM command)

    this is mail from MAILER-DAEMON@***(mydomain).

  5. #285
    Join Date
    Aug 2007
    Beans
    17

    Re: Howto: set up a mail server in Ubuntu

    Quote Originally Posted by q.dinar View Post
    i have got this error after i sent a mail:

    host ***[***] said: 550 Access denied
    - Invalid HELO name (See RFC2821 4.1.1.1) (in reply to MAIL FROM command)

    this is mail from MAILER-DAEMON@***(mydomain).
    Can you post a copy of your main.cf file?

  6. #286

    Re: Howto: set up a mail server in Ubuntu

    Code:
    # 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_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 = dinar-desktop
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = kukmara.ru, dinar-desktop, localhost.localdomain, localhost
    #As we will be using virtual domains, these need to be empty. http://flurdy.com/docs/postfix/
    mydestination = 
    relayhost = 
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    
    # http://flurdy.com/docs/postfix/ :
    # 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_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, #reject_unauth_pipelining, permit 
    #smtpd_sender_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, #reject_unauth_pipelining, permit 
    smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, 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 = reject_unauth_pipelining, permit_mynetworks, reject_non_fqdn_recipient, #reject_unknown_recipient_domain, reject_unauth_destination, permit
    #smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, #reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, check_policy_service #inet:127.0.0.1:10023, permit
    smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, 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 their user id
    virtual_uid_maps = mysql:/etc/postfix/mysql_uid.cf
    # and group id
    virtual_gid_maps = mysql:/etc/postfix/mysql_gid.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
    
    #http://flurdy.com/docs/postfix/
    content_filter = amavis:[127.0.0.1]:10024
    
    #http://flurdy.com/docs/postfix/edition5.html
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    #smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
    smtpd_sasl_security_options = noanonymous
    smtpd_sasl_local_domain = 
    
    #http://flurdy.com/docs/postfix/edition5.html#conf_auth
    #smtpd_use_tls = yes 
    #smtpd_tls_cert_file = /etc/postfix/postfix.cert 
    #smtpd_tls_key_file = /etc/postfix/postfix.key 
    #smtpd_data_restrictions = reject_unauth_pipelining
    
    #http://flurdy.com/docs/postfix/#config-secure-auth
    # TLS parameters 
    #smtp_use_tls = no 
    smtp_tls_security_level = may 
    #smtpd_use_tls=yes 
    smtpd_tls_security_level = may 
    #smtpd_tls_auth_only = no 
    smtp_tls_note_starttls_offer = yes 
    smtpd_tls_loglevel = 1 
    smtpd_tls_received_header = yes 
    smtpd_tls_session_cache_timeout = 3600s 
    tls_random_source = dev:/dev/urandom 
    #smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem 
    #smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key 
    smtpd_tls_cert_file = /etc/postfix/postfix.cert 
    smtpd_tls_key_file = /etc/postfix/postfix.key 
    #smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache 
    #smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

  7. #287
    Join Date
    Jun 2007
    Location
    Porirua, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Howto: set up a mail server in Ubuntu

    Quote Originally Posted by q.dinar View Post
    i have got this error after i sent a mail:

    host ***[***] said: 550 Access denied
    - Invalid HELO name (See RFC2821 4.1.1.1) (in reply to MAIL FROM command)

    this is mail from MAILER-DAEMON@***(mydomain).
    What this says to me is that the receiving system thinks that your system is introducing itself in a way that the receiving system doesn't like. I had a look at the main.cf file you posted, and suspect the following line might need to be changed (someone else might be able to confirm or correct):
    myhostname = dinar-desktop
    On my system I have it set to reflect the name people would use in email addresses and when accessing my website.
    Forum DOs and DON'Ts
    Never assume that information you find using a search engine is up-to-date.

  8. #288
    Join Date
    Oct 2008
    Beans
    94

    Re: Howto: set up a mail server in Ubuntu

    I'm unable to connect using IMAP, what could I have done wrong?

    Code:
    Mar 24 22:20:10 sweb00 authdaemond: received auth request, service=imap, authtype=login
    Mar 24 22:20:10 sweb00 authdaemond: authmysql: trying this module
    Mar 24 22:20:10 sweb00 authdaemond: authmysqllib: connected. Versions: header 50075, client 50083, server 50137
    Mar 24 22:20:10 sweb00 authdaemond: SQL query: SELECT id, "", clear, uid, gid, home, concat(home,'/',maildir), "", name, "" FROM users WHERE id = 'steve'  AND (enabled=1)
    Mar 24 22:20:10 sweb00 imapd: LOGIN FAILED, user=steve, ip=[my home ip]
    Mar 24 22:20:10 sweb00 authdaemond: zero rows returned
    Mar 24 22:20:10 sweb00 authdaemond: no password available to compare
    Mar 24 22:20:10 sweb00 authdaemond: authmysql: REJECT - try next module
    Mar 24 22:20:10 sweb00 authdaemond: FAIL, all modules rejected
    Mar 24 22:20:15 sweb00 imapd: LOGOUT, ip=[my home ip], rcvd=63, sent=499
    Last edited by steev182; March 25th, 2010 at 01:46 AM.
    I'm a PC, and I don't run Windows...

  9. #289
    Join Date
    Oct 2008
    Beans
    94

    Re: Howto: set up a mail server in Ubuntu

    I fixed one problem, logging in, I needed to change 'user' to 'name' in authdaemonrc. But now it looks like I can't send, so will look through the settings I added for SASL - AHHH
    I'm a PC, and I don't run Windows...

  10. #290
    Join Date
    Oct 2008
    Beans
    94

    Re: Howto: set up a mail server in Ubuntu

    My problem now:

    Mar 25 13:55:53 sweb00 imapd-ssl: Failed to connect to socket /tmp/fam--
    Mar 25 13:56:26 sweb00 imapd-ssl: last message repeated 3 times
    Mar 25 13:56:26 sweb00 postfix/smtpd[27826]: warning: SASL per-process initialization failed: generic failure
    Mar 25 13:56:26 sweb00 postfix/smtpd[27826]: fatal: SASL per-process initialization failed
    Mar 25 13:56:27 sweb00 postfix/master[27666]: warning: process /usr/lib/postfix/smtpd pid 27826 exit status 1
    Mar 25 13:56:27 sweb00 postfix/master[27666]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    I'm a PC, and I don't run Windows...

Page 29 of 50 FirstFirst ... 19272829303139 ... 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
  •