Basic Postfix Email Gateway on Ubuntu 10.04

In order to my site be able to send emails, socialengine script, i think i need to follow this tutorial, right?

"Basic Postfix Email Gateway on Ubuntu 10.04"

Well, if that´s right, i have some doubts:

1. During the configuration of postfix, the documentation says:
> The next prompt will ask for the system mail name. This should correspond to the fully qualified domain name (FQDN) that points to your Linode's IP address. In this example, we're using a machine specific hostname for our server. Set the reverse DNS for your Linode's IP address to the fully qualified domain name you assign as the system mail name.

*Do i make up my system mail name? or is the same FQDN i created in /etc/hosts ? The documentation confused me?

*Do i need to set the reverse DNS for my linode´s IP to the system mail name?

Thanks for getting me starting, i´ll have some questions later.

56 Replies

If you actually need your emails to be delivered, I would look into the SaaS options for email. I spent months trying to configure my system to get delivery to yahoo and aol. It never worked. A yahoo rep frankly told me that they only deliver emails from large, established players.

Look into Amazon's SES. It's new, looks pretty awesome, and is CHEAP. I predict they will put most of the other players out of business.

@grevan:

*Do i make up my system mail name? or is the same FQDN i created in /etc/hosts ? The documentation confused me?

*Do i need to set the reverse DNS for my linode´s IP to the system mail name?

Whatever you have set as the reverse DNS for your IP is what you should use for the system mail name.

@deadwalrus:

A yahoo rep frankly told me that they only deliver emails from large, established players.
Even mail from quite large organisations who do not have Yahoo's blessing fail to get through – so Yahoo are, in effect, useless as a mail provider.

Thanks guys. I don´t want to host any emails, i just want to get my site working, and it needs to send confirmation emails to users.

Do you think postfix is the right way to go?

Yes postfix is fine, for you FQDN and rDNS set it to whatever is in /etc/hostname

My FQDN is 'grevan.domain.com'.

In postfix configuration i set 'grevan.domain.com' as my system mail name. Then i went to set reverse DNS - In "Perform a forward lookup" a put 'grevan.domain.com', but > No match was found for 'grevan'. Reverse DNS must have a matching forward entry that points to one of your IPs

How do i set reverse dns?

Thanks

I figured it out that i can only set the reverse DSN to a domain i created a domain zone for.

But, then, do i have to create a domain zone for 'grevan.domain.com' and use it in the reverse DNS?

In the zone for domain.com you want to create an A record for grevan and give it the IP address of your linode. See http://library.linode.com/dns-guides/co … de-manager">http://library.linode.com/dns-guides/configuring-dns-with-the-linode-manager

Once that has had a chance to update you will be able to set your reverse DNS to that name.

Thanks Stever, that help me.

Reading the socialengine script documentation it says:
> Linux Server

The sendmail path may be incorrectly configured (php.ini - sendmail_path). Consult with your host to insure that this directive has been set properly.

Do you think i need only to make this path correct (it´s commented, disable, in my php.ini), but i think i need to install postfix either. Do you think?

You do need to install postfix to send email, postfix provides the sendmail functionality, you may need to modify your sendmail path afterwards but probably not, I didn't need to.

Thanks obs.

So recapitulating:

1. Install postfix

2. Configure on postfix my system mail name to "grevan.domain.com"

3. Create a DNS zone to "domain.com", add an A Record "grevan.domain.com"

4. Set the reverse DNS to "grevan.domain.com" (still can´t set the reverse DNS, maybe the A record is not resolved…)

  • I´m actually using "domain.com", do i have to use my real domain name?

Is that it so far?

Thanks guys

After reloading postfix i get this:

> postfix/postfix-script: fatal: the Postfix mail system is not running

@grevan:

Thanks guys. I don´t want to host any emails, i just want to get my site working, and it needs to send confirmation emails to users.

Do you think postfix is the right way to go?

Like I said, it depends on if you want your people to actually receive your confirmation emails. If they are using yahoo, they won't. You can get around this sometimes by telling them on the confirmation page that if they don't receive your emails to check their spam folders. Users often don't, though.

That being said, my setup uses postfix unless it detects a yahoo or aol email address, in which case it smpt's to gmail to send using their services (I have a google apps account).

To gain delivery to hotmail and live you also need to configure domainkeys and Microsoft's ID service (I forget what it is called at the moment).

Honestly, if I had to to it again I would just send everything via smtp to gmail and setup Amazon SES if I needed to send out over 500 per day. And actually, when I get some spare time I am going to move over that way anyways. Rolling your own is just asking for punishment and frustration – if you actually care about having your emails delivered, that is.

@grevan:

  • I´m actually using "domain.com", do i have to use my real domain name?

You have to use a real domain to set your reverse DNS.

@deadwalrus:

Like I said, it depends on if you want your people to actually receive your confirmation emails. If they are using yahoo, they won't. You can get around this sometimes by telling them on the confirmation page that if they don't receive your emails to check their spam folders. Users often don't, though.

My postfix sends to yahoo fine :/

My postfix sends fine to Yahoo, Hotmail, Gmail, you name it.

I think mileage varies…

From various forum posts over time, it seems like it's a bit hit or miss. Some people have no problems and others have tons of problems, even with correct mail server DNS information, setting up SPF or specific processes for the target service. Yahoo and Hotmail seem to be the most likely to bounce or declare mail as spam.

I've certainly seen posts by folks who appear to have done everything right and still have problems that if I were trying to set it up, I might well be cautious enough to try to use some other service before running my own.

-- David

You guys are lucky. do you have a secret to your sucess? It might be that your IPs somehow got whitelisted (maybe by the former IP holder?).

Back when I was trying to get the kinks worked out, I had a conversation with a yahoo rep. He confirmed that my email was properly configured, and that I was not blacklisted, but that the problem was they use a "whitelist" which my IP was not on. I asked how I could get on there, and he basically told me I couldn't.

I have no problems with gmail, hotmail or live. Most small providers accept my emails. I have never gotten them to work with yahoo though. Directly to spam every. single. time. I have both domainkeys and dkim running, reverse DNS, SPF, you name it. I finally gave up.

Also, regarding Yahoo using a "whitelist" to deliver email. WTF kind of a backasswards policy is that?? Did someone throw their hands up and say, "This spam problem is hard – let's give up?" (And yes, in case it is not apparent, Yahoo's process left me a bit jaded with them.)

I did have some issue with hotmail and yahoo wayyyyy back when, my emails are normally account verification emails, I found that by stripping the http:// part from a link it stopped emails going to spam, why? No idea and does it matter, not really since most if not all email clients will make the address a link without the http://

I´m getting this error message:

  • Reloading Postfix configuration… postfix/postfix-script: fatal: the Postfix mail system is not running

what does tail /var/log/mail.log say?

Feb 22 20:30:08 li157-51 postfix/postfix-script[21110]: fatal: the Postfix mail system is not running

Feb 23 16:37:20 li157-51 postfix/master[24780]: fatal: bind 0.0.0.0 port 25: Add ress already in use

Feb 23 16:40:38 li157-51 postfix/master[25240]: fatal: bind 0.0.0.0 port 25: Add ress already in use

Feb 23 16:43:07 li157-51 postfix/postfix-script[25259]: fatal: the Postfix mail system is not running

Feb 24 13:43:06 li157-51 sendmail[27059]: alias database /etc/mail/aliases rebui lt by root

Feb 24 13:43:06 li157-51 sendmail[27059]: /etc/mail/aliases: 4 aliases, longest 10 bytes, 66 bytes total

Feb 24 13:43:06 li157-51 sm-mta[27120]: starting daemon (8.14.3): SMTP+queueing@ 00:10:00

Feb 24 13:45:24 li157-51 postfix/master[27542]: fatal: bind 0.0.0.0 port 25: Add ress already in use

Feb 24 13:47:25 li157-51 postfix/postfix-script[27561]: fatal: the Postfix mail system is not running

Feb 24 14:05:38 li157-51 postfix/postfix-script[27655]: fatal: the Postfix mail system is not running

run sudo netstat -lnp | grep ":25" and it'll show what else is listening on port 25.

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 271 20/sendmail: MTA

Alright postfix should say "master" instead of "sendmail" so it looks like you have two email servers, try running apt-get remove exim4-daemon-light exim4-daemon-heavy citadel-suite that will remove the common ones people use and leave postfix, then try restarting postfix.

> Reading package lists… Done

Building dependency tree

Reading state information… Done

Package exim4-daemon-light is not installed, so not removed

Package exim4-daemon-heavy is not installed, so not removed

Package citadel-suite is not installed, so not removed

The following packages were automatically installed and are no longer required:

sendmail-base m4 procmail sensible-mda sendmail-cf libdb4.7

Use 'apt-get autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I still got the error obs, thanks for helping

Still the same log:

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 27120/sendmail: MTA

what does ps -fp 27120 output

UID PID PPID C STIME TTY TIME CMD

root 27120 1 0 13:43 ? 00:00:00 sendmail: MTA: accepting connect

try apt-get remove sendmail and then restart postfix it looks like you have sendmail running as a daemon

> Package sendmail is not installed, so not removed

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Strange.

dump the output of dpkg -l into http://pastebin.linode.com/ and I'll see which package is causing the problem.

ii dhcp3-client 3.1.3-2ubuntu3 DHCP client

ii dhcp3-common 3.1.3-2ubuntu3 common files used by all the dhcp3* packages

ii diffutils 1:2.8.1-18 File comparison utilities

ii dmidecode 2.9-1.2 Dump Desktop Management Interface data

ii dmsetup 2:1.02.39-1ubuntu4.1 The Linux Kernel Device Mapper userspace library

ii dnsutils 1:9.7.0.dfsg.P1-1ubuntu0.1 Clients provided with BIND

ii dosfstools 3.0.7-1 utilities for making and checking MS-DOS FAT filesystems

ii dpkg 1.15.5.6ubuntu4.5 Debian package management system

ii e2fslibs 1.41.11-1ubuntu2.1 ext2/ext3/ext4 file system libraries

ii e2fsprogs 1.41.11-1ubuntu2.1 ext2/ext3/ext4 file system utilities

ii ed 1.4-1build1 The classic UNIX line editor

ii eject 2.1.5+deb1+cvs20081104-7 ejects CDs and operates CD-Changers under Linux

ii file 5.03-5ubuntu1 Determines file type using "magic" numbers

ii findutils 4.4.2-1ubuntu1 utilities for finding files–find, xargs

ii fontconfig-config 2.8.0-2ubuntu1 generic font configuration library - configuration

ii ftp 0.17-19build1 The FTP client

ii gcc-4.4-base 4.4.3-4ubuntu5 The GNU Compiler Collection (base package)

ii gnupg 1.4.10-2ubuntu1 GNU privacy guard - a free PGP replacement

ii gnupg-curl 1.4.10-2ubuntu1 GNU privacy guard - a free PGP replacement (cURL)

ii gpgv 1.4.10-2ubuntu1 GNU privacy guard - signature verification tool

ii grep 2.5.4-4build1 GNU grep, egrep and fgrep

ii groff-base 1.20.1-7 GNU troff text-formatting system (base system components)

ii gzip 1.3.12-9ubuntu1.1 GNU compression utilities

ii hdparm 9.15-1ubuntu9 tune hard disk parameters for high performance

ii hostname 3.03ubuntu1 utility to set/show the host name or domain name

ii ifupdown 0.6.8ubuntu29.2 high level tools to configure network interfaces

ii info 4.13a.dfsg.1-5ubuntu1 Standalone GNU Info documentation browser

ii initramfs-tools 0.92bubuntu78 tools for generating an initramfs

ii initramfs-tools-bin 0.92bubuntu78 binaries used by initramfs-tools

ii initscripts 2.87dsf-4ubuntu17 scripts for initializing and shutting down the system

ii insserv 1.12.0-14 Tool to organize boot sequence using LSB init.d script dependencies

ii install-info 4.13a.dfsg.1-5ubuntu1 Manage installed documentation in info format

ii iproute 20091226-1 networking and traffic control tools

ii iptables 1.4.4-2ubuntu2 administration tools for packet filtering and NAT

ii iputils-ping 3:20071127-2ubuntu1 Tools to test the reachability of network hosts

ii iso-codes 3.12.1-1 ISO language, territory, currency, script codes and their translations

ii kbd 1.15-1ubuntu3 Linux console font and keytable utilities

ii klibc-utils 1.5.17-4ubuntu1 small utilities built with klibc for early boot

ii language-pack-en 1:10.04+20110204 translation updates for language English

ii language-pack-en-base 1:10.04+20110204 translations for language English

ii language-selector-common 0.5.8 Language selector for Ubuntu Linux

ii laptop-detect 0.13.7ubuntu2 attempt to detect a laptop

ii less 436-1 pager program similar to more

ii libacl1 2.2.49-2 Access control list shared library

ii libapache2-mod-php5 5.3.2-1ubuntu4.7 server-side, HTML-embedded scripting language (Apache 2 module)

ii libapr1 1.3.8-1build1 The Apache Portable Runtime Library

ii libaprutil1 1.3.9+dfsg-3ubuntu0.10.04.1 The Apache Portable Runtime Utility Library

ii libaprutil1-dbd-sqlite3 1.3.9+dfsg-3ubuntu0.10.04.1 The Apache Portable Runtime Utility Library - SQLite3 Driver

ii libaprutil1-ldap 1.3.9+dfsg-3ubuntu0.10.04.1 The Apache Portable Runtime Utility Library - LDAP Driver

ii libatm1 1:2.5.1-1.2 shared library for ATM (Asynchronous Transfer Mode)

ii libattr1 1:2.4.44-1 Extended attribute shared library

ii libbind9-60 1:9.7.0.dfsg.P1-1ubuntu0.1 BIND9 Shared Library used by BIND

ii libblkid1 2.17.2-0ubuntu1.10.04.2 block device id library

ii libbsd0 0.2.0-1 utility functions from BSD systems - shared library

ii libbz2-1.0 1.0.5-4ubuntu0.1 high-quality block-sorting file compressor library - runtime

ii libc-bin 2.11.1-0ubuntu7.8 Embedded GNU C Library: Binaries

ii libc6 2.11.1-0ubuntu7.8 Embedded GNU C Library: Shared libraries

ii libc6-i686 2.11.1-0ubuntu7.8 GNU C Library: Shared libraries [i686 optimized]

ii libcap2 1:2.17-2ubuntu1 support for getting/setting POSIX.1e capabilities

ii libclass-accessor-perl 0.34-1 Perl module that automatically generates accessors

ii libcomerr2 1.41.11-1ubuntu2.1 common error description library

ii libcurl3 7.19.7-1ubuntu1 Multi-protocol file transfer library (OpenSSL)

ii libcurl3-gnutls 7.19.7-1ubuntu1 Multi-protocol file transfer library (GnuTLS)

ii libcwidget3 0.5.13-1ubuntu1 high-level terminal interface library for C++ (runtime files)

ii libdb4.8 4.8.24-1ubuntu1 Berkeley v4.8 Database Libraries [runtime]

ii libdbd-mysql-perl 4.012-1ubuntu1 A Perl5 database interface to the MySQL database

ii libdbi-perl 1.609-1build1 Perl Database Interface (DBI)

ii libdbus-1-3 1.2.16-2ubuntu4.1 simple interprocess messaging system

ii libdevmapper1.02.1 2:1.02.39-1ubuntu4.1 The Linux Kernel Device Mapper userspace library

ii libdns64 1:9.7.0.dfsg.P1-1ubuntu0.1 DNS Shared Library used by BIND

ii libdrm-intel1 2.4.18-1ubuntu3 Userspace interface to intel-specific kernel DRM services – runtime

ii libdrm-nouveau1 2.4.18-1ubuntu3 Userspace interface to nouveau-specific kernel DRM services -- runtime

ii libdrm-radeon1 2.4.18-1ubuntu3 Userspace interface to radeon-specific kernel DRM services -- runtime

ii libdrm2 2.4.18-1ubuntu3 Userspace interface to kernel DRM services -- runtime

ii libedit2 2.11-20080614-1build1 BSD editline and history libraries

ii libelf1 0.143-1 library to read and write ELF files

ii libept0 0.5.30 High-level library for managing Debian package information

ii libexpat1 2.0.1-7ubuntu1 XML parsing C library - runtime library

ii libfontconfig1 2.8.0-2ubuntu1 generic font configuration library - runtime

ii libfreetype6 2.3.11-1ubuntu2.4 FreeType 2 font engine, shared library files

ii libfribidi0 0.19.2-1 Free Implementation of the Unicode BiDi algorithm

ii libgcc1 1:4.4.3-4ubuntu5 GCC support library

ii libgcrypt11 1.4.4-5ubuntu2 LGPL Crypto library - runtime library

ii libgd2-xpm 2.0.36~rc1~dfsg-3.1ubuntu1 GD Graphics Library version 2

ii libgdbm3 1.8.3-9 GNU dbm database routines (runtime version)

ii libgeoip1 1.4.6.dfsg-17 A non-DNS IP-to-country resolver library

ii libglib2.0-0 2.24.1-0ubuntu1 The GLib library of C routines

ii libgmp3c2 2:4.3.2+dfsg-1ubuntu1 Multiprecision arithmetic library

ii libgnutls26 2.8.5-2 the GNU TLS library - runtime library

ii libgpg-error0 1.6-1ubuntu2 library for common error values and messages in GnuPG components

ii libgpm2 1.20.4-3.2ubuntu2 General Purpose Mouse - shared library

ii libgssapi-krb5-2 1.8.1+dfsg-2ubuntu0.6 MIT Kerberos runtime libraries - krb5 GSS-API Mechanism

ii libidn11 1.15-2 GNU Libidn library, implementation of IETF IDN specifications

ii libio-string-perl 1.08-2 Emulate IO::File interface for in-core strings

ii libisc60 1:9.7.0.dfsg.P1-1ubuntu0.1 ISC Shared Library used by BIND

ii libisccc60 1:9.7.0.dfsg.P1-1ubuntu0.1 Command Channel Library used by BIND

ii libisccfg60 1:9.7.0.dfsg.P1-1ubuntu0.1 Config File Handling Library used by BIND

ii libjpeg62 6b-15ubuntu1 The Independent JPEG Group's JPEG runtime library

ii libk5crypto3 1.8.1+dfsg-2ubuntu0.6 MIT Kerberos runtime libraries - Crypto Library

ii libkeyutils1 1.2-12 Linux Key Management Utilities (library)

ii libklibc 1.5.17-4ubuntu1 minimal libc subset for use with initramfs

ii libkrb5-3 1.8.1+dfsg-2ubuntu0.6 MIT Kerberos runtime libraries

ii libkrb5support0 1.8.1+dfsg-2ubuntu0.6 MIT Kerberos runtime libraries - Support library

ii libldap-2.4-2 2.4.21-0ubuntu5.3 OpenLDAP libraries

ii liblocale-gettext-perl 1.05-6 Using libc functions for internationalization in Perl

ii liblockfile1 1.08-3ubuntu1 NFS-safe locking library, includes dotlockfile program

ii liblwres60 1:9.7.0.dfsg.P1-1ubuntu0.1 Lightweight Resolver Library used by BIND

ii libmagic1 5.03-5ubuntu1 File type determination library using "magic" numbers

ii libmpfr1ldbl 2.4.2-3ubuntu1 multiple precision floating-point computation

ii libmysqlclient16 5.1.41-3ubuntu12.9 MySQL database client library

ii libncurses5 5.7+20090803-2ubuntu3 shared libraries for terminal handling

ii libncursesw5 5.7+20090803-2ubuntu3 shared libraries for terminal handling (wide character support)

ii libnet-daemon-perl 0.43-1 Perl module for building portable Perl daemons easily

ii libnewt0.52 0.52.10-5ubuntu1 Not Erik's Windowing Toolkit - text mode windowing with slang

ii libnih-dbus1 1.0.1-1 NIH D-Bus Bindings Library

ii libnih1 1.0.1-1 NIH Utility Library

ii libpam-modules 1.1.1-2ubuntu5 Pluggable Authentication Modules for PAM

ii libpam-runtime 1.1.1-2ubuntu5 Runtime support for the PAM library

ii libpam0g 1.1.1-2ubuntu5 Pluggable Authentication Modules library

ii libparse-debianchangelog-perl 1.1.1-2ubuntu2 parse Debian changelogs and output them in other formats

ii libparted0debian1 2.2-5ubuntu5.1 The GNU Parted disk partitioning shared library

ii libpci3 1:3.0.0-4ubuntu17 Linux PCI Utilities (shared library)

ii libpcre3 7.8-3build1 Perl 5 Compatible Regular Expression Library - runtime files

ii libplrpc-perl 0.2020-2 Perl extensions for writing PlRPC servers and clients

ii libplymouth2 0.8.2-2ubuntu2.2 graphical boot animation and logger - shared libraries

ii libpng12-0 1.2.42-1ubuntu2.1 PNG library - runtime

ii libpopt0 1.15-1 lib for parsing cmdline parameters

ii libpython2.6 2.6.5-1ubuntu6 Shared Python runtime library (version 2.6)

ii libreadline6 6.1-1 GNU readline and history libraries, run-time libraries

ii libsasl2-2 2.1.23.dfsg1-5ubuntu1 Cyrus SASL - authentication abstraction library

ii libsasl2-modules 2.1.23.dfsg1-5ubuntu1 Cyrus SASL - pluggable authentication modules

ii libselinux1 2.0.89-4 SELinux runtime shared libraries

ii libsepol1 2.0.40-2 SELinux library for manipulating binary security policies

ii libsigc++-2.0-0c2a 2.2.4.2-1 type-safe Signal Framework for C++ - runtime

ii libslang2 2.2.2-2ubuntu1 The S-Lang programming library - runtime version

ii libsqlite3-0 3.6.22-1 SQLite 3 shared library

ii libss2 1.41.11-1ubuntu2.1 command-line interface parsing library

ii libssl0.9.8 0.9.8k-7ubuntu8.6 SSL shared libraries

ii libstdc++6 4.4.3-4ubuntu5 The GNU Standard C++ Library v3

ii libsub-name-perl 0.04-1build1 Assigns a new name to referenced sub

ii libt1-5 5.1.2-3build1 Type 1 font rasterizer library - runtime

ii libtasn1-3 2.4-1 Manage ASN.1 structures (runtime)

ii libtext-charwidth-perl 0.04-6 get display widths of characters on the terminal

ii libtext-iconv-perl 1.7-2 converts between character sets in Perl

ii libtext-wrapi18n-perl 0.06-7 internationalized substitute of Text::Wrap

ii libtimedate-perl 1.1900-1 Time and date functions for Perl

ii libudev0 151-12.3 udev library

ii libusb-0.1-4 2:0.1.12-14ubuntu0.2 userspace USB programming library

ii libuuid1 2.17.2-0ubuntu1.10.04.2 Universally Unique ID library

ii libwrap0 7.6.q-18 Wietse Venema's TCP wrappers library

ii libx11-6 2:1.3.2-1ubuntu3 X11 client-side library

ii libx11-data 2:1.3.2-1ubuntu3 X11 client-side library

ii libxapian15 1.0.18-1 Search engine library

ii libxau6 1:1.0.5-1 X11 authorisation library

ii libxcb1 1.5-2 X C Binding

ii libxdmcp6 1:1.0.3-1 X11 Display Manager Control Protocol library

ii libxml2 2.7.6.dfsg-1ubuntu1.1 GNOME XML library

ii libxpm4 1:3.5.8-1 X11 pixmap library

ii locales 2.11+git20100304-3 common files for locale support

ii lockfile-progs 0.1.13ubuntu1 Programs for locking and unlocking files and mailboxes

ii login 1:4.1.4.2-1ubuntu2.2 system login tools

ii logrotate 3.7.8-4ubuntu2 Log rotation utility

ii lsb-base 4.0-0ubuntu8 Linux Standard Base 4.0 init script functionality

ii lsb-release 4.0-0ubuntu8 Linux Standard Base version reporting utility

ii lshw 02.14-1build1 information about hardware configuration

ii lsof 4.81.dfsg.1-1build1 List open files

ii ltrace 0.5.3-2ubuntu3 Tracks runtime library calls in dynamically linked programs

ii lzma 4.43-14ubuntu2 Compression method of 7z format in 7-Zip program

ii make 3.81-7ubuntu1 An utility for Directing compilation.

ii makedev 2.3.1-89ubuntu1 creates device files in /dev

ii man-db 2.5.7-2ubuntu1 on-line manual pager

ii mawk 1.3.3-15ubuntu2 a pattern scanning and text processing language

ii memtest86+ 4.00-2ubuntu3 thorough real-mode memory tester

ii mime-support 3.48-1ubuntu1 MIME files 'mime.types' & 'mailcap', and support programs

ii module-init-tools 3.11.1-2ubuntu1 tools for managing Linux kernel modules

ii mount 2.17.2-0ubuntu1.10.04.2 Tools for mounting and manipulating filesystems

ii mountall 2.15.3 filesystem mounting tool

ii mtr-tiny 0.75-2build1 Full screen ncurses traceroute tool

ii mysql-client-5.1 5.1.41-3ubuntu12.9 MySQL database client binaries

ii mysql-client-core-5.1 5.1.41-3ubuntu12.9 MySQL database core client binaries

ii mysql-common 5.1.41-3ubuntu12.9 MySQL database common files (e.g. /etc/mysql/my.cnf)

ii mysql-server 5.1.41-3ubuntu12.9 MySQL database server (metapackage depending on the latest version)

ii mysql-server-5.1 5.1.41-3ubuntu12.9 MySQL database server binaries

ii mysql-server-core-5.1 5.1.41-3ubuntu12.9 MySQL database core server files

ii nano 2.2.2-1 small, friendly text editor inspired by Pico

ii ncurses-base 5.7+20090803-2ubuntu3 basic terminal type definitions

ii ncurses-bin 5.7+20090803-2ubuntu3 terminal-related programs and man pages

ii net-tools 1.60-23ubuntu2 The NET-3 networking toolkit

ii netbase 4.35ubuntu3 Basic TCP/IP networking system

ii netcat-openbsd 1.89-3ubuntu2 TCP/IP swiss army knife

ii ntp 1:4.2.4p8+dfsg-1ubuntu2 Network Time Protocol daemon and utility programs

ii ntpdate 1:4.2.4p8+dfsg-1ubuntu2 client for setting system time from NTP servers

ii openssh-client 1:5.3p1-3ubuntu5 secure shell (SSH) client, for secure access to remote machines

ii openssh-server 1:5.3p1-3ubuntu5 secure shell (SSH) server, for secure access from remote machines

ii openssl 0.9.8k-7ubuntu8.6 Secure Socket Layer (SSL) binary and related cryptographic tools

ii parted 2.2-5ubuntu5.1 The GNU Parted disk partition resizing program

ii passwd 1:4.1.4.2-1ubuntu2.2 change and administer password and group data

ii pciutils 1:3.0.0-4ubuntu17 Linux PCI Utilities

ii perl 5.10.1-8ubuntu2 Larry Wall's Practical Extraction and Report Language

ii perl-base 5.10.1-8ubuntu2 minimal Perl system

ii perl-modules 5.10.1-8ubuntu2 Core Perl modules

ii php-apc 3.1.3p1-2 APC (Alternative PHP Cache) module for PHP 5

ii php-pear 5.3.2-1ubuntu4.7 PEAR - PHP Extension and Application Repository

ii php5 5.3.2-1ubuntu4.7 server-side, HTML-embedded scripting language (metapackage)

ii php5-cli 5.3.2-1ubuntu4.7 command-line interpreter for the php5 scripting language

ii php5-common 5.3.2-1ubuntu4.7 Common files for packages built from the php5 source

ii php5-curl 5.3.2-1ubuntu4.7 CURL module for php5

ii php5-gd 5.3.2-1ubuntu4.7 GD module for php5

ii php5-mysql 5.3.2-1ubuntu4.7 MySQL module for php5

ii plymouth 0.8.2-2ubuntu2.2 graphical boot animation and logger - main package

ii popularity-contest 1.48ubuntu1 Vote for your favourite packages automatically

ii postfix 2.7.0-1 High-performance mail transport agent

ii procps 1:3.2.8-1ubuntu4 /proc file system utilities

ii psmisc 22.10-1 utilities that use the proc file system

ii python 2.6.5-0ubuntu1 An interactive high-level object-oriented language (default version)

ii python-apt 0.7.94.2ubuntu6.2 Python interface to libapt-pkg

ii python-central 0.6.15ubuntu1 register and build utility for Python packages

ii python-minimal 2.6.5-0ubuntu1 A minimal subset of the Python language (default version)

ii python2.6 2.6.5-1ubuntu6 An interactive high-level object-oriented language (version 2.6)

ii python2.6-minimal 2.6.5-1ubuntu6 A minimal subset of the Python language (version 2.6)

ii readline-common 6.1-1 GNU readline and history libraries, common files

ii rsync 3.0.7-1ubuntu1 fast remote file copy program (like rcp)

ii rsyslog 4.2.0-2ubuntu8.1 enhanced multi-threaded syslogd

ii sed 4.2.1-6 The GNU sed stream editor

rc sendmail-base 8.14.3-9.1ubuntu1 powerful, efficient, and scalable Mail Transport Agent

rc sendmail-bin 8.14.3-9.1ubuntu1 powerful, efficient, and scalable Mail Transport Agent

rc sendmail-cf 8.14.3-9.1ubuntu1 powerful, efficient, and scalable Mail Transport Agent

rc sensible-mda 8.14.3-9.1ubuntu1 Mail Delivery Agent wrapper

ii sensible-utils 0.0.1ubuntu3 Utilities for sensible alternative selection

ii ssl-cert 1.0.23ubuntu2 simple debconf wrapper for OpenSSL

ii strace 4.5.19-2 A system call tracer

ii sudo 1.7.2p1-1ubuntu5.3 Provide limited super user privileges to specific users

ii sysv-rc 2.87dsf-4ubuntu17 System-V-like runlevel change mechanism

ii sysvinit-utils 2.87dsf-4ubuntu17 System-V-like utilities

ii tar 1.22-2ubuntu1 GNU version of the tar archiving utility

ii tasksel 2.73ubuntu26 Tool for selecting tasks for installation on Debian systems

ii tasksel-data 2.73ubuntu26 Official tasks used for installation of Debian systems

ii time 1.7-23build1 The GNU time program for measuring cpu resource usage

ii traceroute 2.0.13-2 Traces the route taken by packets over an IPv4/IPv6 network

ii ttf-dejavu-core 2.30-2 Vera font family derivate with additional characters

ii tzdata 2010o-0ubuntu0.10.04 time zone and daylight-saving time data

ii ubuntu-keyring 2010.11.09 GnuPG keys of the Ubuntu archive

ii ubuntu-minimal 1.197 Minimal core of Ubuntu

ii ubuntu-standard 1.197 The Ubuntu standard system

ii ucf 3.0025 Update Configuration File: preserve user changes to config files.

ii udev 151-12.3 rule-based device node and kernel event manager

ii unzip 6.0-1build1 De-archiver for .zip files

ii upstart 0.6.5-8 event-based init daemon

ii ureadahead 0.100.0-4.1.3 Read required files in advance

ii usbutils 0.86-2ubuntu1 Linux USB utilities

ii util-linux 2.17.2-0ubuntu1.10.04.2 Miscellaneous system utilities

ii vim 2:7.2.330-1ubuntu3 Vi IMproved - enhanced vi editor

ii vim-common 2:7.2.330-1ubuntu3 Vi IMproved - Common files

ii vim-runtime 2:7.2.330-1ubuntu3 Vi IMproved - Runtime files

ii vim-tiny 2:7.2.330-1ubuntu3 Vi IMproved - enhanced vi editor - compact version

ii wget 1.12-1.1ubuntu2.1 retrieves files from the web

ii whiptail 0.52.10-5ubuntu1 Displays user-friendly dialog boxes from shell scripts

ii whois 5.0.0ubuntu3 an intelligent whois client

ii xkb-data 1.8-1ubuntu8 X Keyboard Extension (XKB) configuration data

ii zlib1g 1:1.2.3.3.dfsg-15ubuntu1 compression library - runtime

The only mta I see is postfix, you've had sendmail installed but it's been removed, silly question, have you rebooted?

No, just restarted apache. Do i need to?

Might help, could just be a lingering process that hasn't been killed for some odd reason.

That worked! Now i reloaded postfix and no error messages.

Now i need to keep trying to setup it right.

What is driving me crazy is the FQDN thing in the documentation.

1. In the starting guide it says to edit "/etc/hosts"

so now is:
> 127.0.0.1 localhost

173.xxx.xxx.51 grevan.domain.com grevan
Do "domain.com" must be a real domain? It´s not well explained there.

2. In Postfix documentation it mentions FQDN as your real domain with a DNS zone and a A Record.

I just don´t know if i have to change my FQDN in "/etc/hosts" to be the same in postfix…

Confused here

Thanks a lot obs!

Yes it needs to be a real domain name so other servers on the internet can access it.

You should set /etc/hostname to the real domain FQDN as well as adding it to /etc/hosts and add it to /etc/mailname

Then make sure you've set your DNS servers to point an A record for your FQDN to your ip, this may take a day to take effect (normally only 15 minutes).

Lastly your /etc/postfix/main.cf should look something like this

# 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 = YOURFQDN
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost, localhost.$mydomain, localhost
relayhost = 
mynetworks = 127.0.0.0
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = 127.0.0.1
inet_protocols = ipv4

Note replace YOURFQDN with your FQDN, (that's my working config btw).

If you're using a firewall you'll need to allow outbound access on port 25.

Thanks obs.

So in /etc/hostname should i set a real domain name?

It´s just "grevan" there.

In the starting guide it says to:
> echo "plato" > /etc/hostname

hostname -F /etc/hostname

no domain here, just a name "plato"

  • and just to clear my thoughts., i just pick a real domain i have to add in the etc/hosts? No matter how many domains i host in my server, there will be only one domain in etc/hosts?

yes it's a good idea to put the FQDN in /etc/hostname

technically you don't have to add it to /etc/hosts it just speeds up local DNS resolution, you just need to have one real domain as your FQDN in /etc/hostname /etc/hosts etc

In /etc/postfix/main.cf
> myhostname = mail.mydomain.com
my FQDN is mydomain.com, should i change myhostname in main.cf to mydomain.com?

I created an A Record in mydomain.com called "mail", is that it?

If you created an A record for mail.mydomain.com then your FQDN is mail.mydomain.com not mydomain.com

Oh, i see.

When i create a domain zone, by default is created a "www" and a "mail" A Records.

In this case wich one is my FQDN in "etc/hostname"?

Do i leave it like this?

*maybe i´m getting this wrong.

I think "myhostname" in "/etc/postfix/main.cf" is not the same "hostname" in "/etc/hosts", they are all mentioned as FQDN, but they are not the same then.

In "main.cf", myhostname depends on my A Record.

In "etc/hostname" is my domain a created a DNS zone for.

A FQDN is a fully qualified domain name which can be

domain.com

www.domain.com

mail.domain.com

pie.domain.com

anything.domain.com

Basically whatever you like as long as you own domain.com

All you need to do is be consistent /etc/hostname /etc/hosts /etc/mailname and myhostname all need to be the same one.

Thanks obs!

How much i´ve learned today.

The documentation in the library is not that "consistent" :roll:

One more thing. :oops:

Do i need to set a reverse DNS anyway?

What is that for?

Thanks

The library is pretty good but it can be confusing it's like information overload.

Anyway yes set rDNS, reverse dns resolves your ip address to your domain, mail servers use it to help prevent spam.

Thank you very much for your help!

In my site´s script, socialengine, i can now send emai to all members in the administration section, but on the public side of the site, there is an invite page that members can inite anyone to join, but it´s not working there.

I just did the basic configuration of postfix, didn´t setup any Email Virtual Hosting in "/etc/postfix/virtual", i think this is to setup accounts to receive emails, am i right?

Do you have any clues of what can be wrong or missing?

What does tail /var/log/mail.log say after you try and send an email from the invite page, you don't need to set up any virtual hosting unless you want to receive emails (which you don't).

Strange, i tried another email receipt and it was sent.

The gmail is not received, i tried again, but the hotmail was.

I tried to send to 3 emails: gmail, hotmail and centroin, the log shows only the hotmail and centroin, it ignores the gmail….

Your log shows one to gmail here

Feb 25 15:55:38 loseweightforever postfix/smtp[2339]: 2B579105CC: to=<domainhut@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.225.27]:25, delay=0.59, delays=0.05/0.01/0.16/0.37, dsn=2.0.0, status=sent (250 2.0.0 OK 1298649338 ut8si1846805icb.77)</domainhut@gmail.com> 

Try setting up a spf record (see here http://old.openspf.org/wizard.html) then give it a day and see if you still have problems.

That to gmail was an old one, from the admin area, that works…

Ok, i will give that a try.

But i have a question, just noticed, when i sent the email to Centroin, when i checked the inbox, in the Sender field appears : SocialBits@loseweightforever.biz

In hotmail or Gmail appears only SocialBits. My FQDN is loseweightforever.biz, but socialbits is another site, another subject, so it feels strange. Do you know how to managed that?

Thanks a lot.

Your script needs to set the correct headers and use the php mail additional parameters to add "-r fromemail@domain.com" (replacing fromemail@domain.com with the real email).

Thanks obs!

Really helpful.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct