Hey all,

Words can't express how awesome this website is and the the ideals behind it, much appreciated.

Anyway, sendmail was always the one thing that I just couldn't figure out. The last time I tried four years ago, I had given up. I'm trying again now on Fedora 12, as it is the only thing left to do until everything is good to go. The built-up dread of this fact has been realized. I need help, here.

I've been able to find a few detailed tutorials, but they all presumed you had a static IP. I do not, and I use everydns.net to keep the DNS record updated on a bi-hourly basis. How can I apply the same for, say, mail.mydomain.com?

I have to make it clear that I don't fundamentally understand sendmail. I understand the overall basis of email, but I don't fully understand the internal process of SMTP. If anyone could point me in the right direction, I'd really appreciate it.

asked 03 May '10, 13:56

Steve's gravatar image

Steve
3315
accept rate: 0%




I totally agree with Keith.

Use postfix instead of sendmail. You'll find it much easier to configure and manage.

I have postfix operating behind a dynamic IP address, using Zonedit to manage DNS for my domain names. I have smtps, imaps and pops configured for secure remote connections.

Happy to help you out with anything relating to postfix :)

link

answered 03 May '10, 23:13

Ian%201's gravatar image

Ian 1
261
accept rate: 100%

I researched postfix with virtual users. I'll never look back. Now I just need to work on a custom, more user-friendly front-end using PHP to manage email users. phpMyAdmin does get the job done, but not in a very timely manner.

Just about everything simply worked, though. SELinux was being a stubborn mule, but I eventually got around it. :)

(10 May '10, 23:49) Steve

Kindly have a look. I hope it'll whelp you.

http://bcn.boulder.co.us/~neal/cablemail.html

link

answered 03 May '10, 18:50

Gladiator's gravatar image

Gladiator
213
accept rate: 0%

I appreciate the link, it helped me understand smtp a bit better. :)

(10 May '10, 23:49) Steve

Why use sendmail?

Postfix is a superior product IMHO

link

answered 03 May '10, 21:20

Keith's gravatar image

Keith
211
accept rate: 0%

Gladiator's link captured the SMTP situation very well, "... running a "direct-to-mx" outbound mail server on a dynamic address no longer is practical - too many sites just block mail from dynamic IP addresses. Sigh."

But I use my home Linux PC as my personal secure IMAP server, even though the IP address can, and does, change occasionally. Here's a stripped down version of the script that I run to automatically update it. (I really run one cron script as a regular user to generate it, and a second cron script as root to install it.)

It also generates a cert file in the form ip-XX-XX-XX-XX.pem, where the X's are my IP address. I don't currently use it for anything, but it's been my plan to use it for a variety of things, if I ever get to it.

#!/bin/sh
PKICERT=/etc/pki/tls

# Get and verify my home IP address

IP="$(curl -s http://jackson.io/ip/)"
case "$IP" in
    ""|*[!0-9.]*)  echo "ERROR: Invalid IP address \"$IP\"";  exit 1 ;;
esac
HOMEURL="$(host "$IP" | sed 's/.*pointer //;s/\.$//')"
echo $HOMEURL | grep -q pool-  ||  { echo "ERROR getting URL"; exit 1; }

# Generate the new general-purpose PEM filename

PEM="ip-$(echo $IP | /usr/bin/tr . -).pem"
case "$PEM" in
    ip-*-*-*-*.pem) ;;
    *) echo "Incorrect name for cert file \"$PEM\""
       exit 1
       ;;
esac

# Exit if the existing cert is correct

if [ -s "$PKICERT/$PEM" ]; then
    echo "The existing PEM file is correct"
    exit 0
fi

# Make a new TLS certificate for imapd
#
# This procedure was developed by looking at the postinstall scriptlet:
#     rpm -q --scripts uw-imap
# This command will dump the resulting pem file:
#     certtool -i --infile imapd.pem
#
# Prompts: CountryName, StateName, LocalityName, OrganizationalName,
#          OrganizationalUnitName, CommonName, EmailAddress
#
cd /tmp  ||  { echo "Error: Can't cd to /tmp"; exit 1; }
rm -f *.pem
CERT=imapd.pem
MAKEFILE=/etc/pki/tls/certs/Makefile
make -f $MAKEFILE $CERT << EOF &> /dev/null
US
Maryland
Home
My Name
mydomain.com
$HOMEURL
me@mydomain.com
EOF

if [ ! $? ]; then
    echo ERROR creating key and certificate
    rm -f $CERT
    exit 1
fi
sed -n '/BEGIN CERT/,/END CERT/p' $CERT > $PEM

# Delete old certs

/usr/bin/sudo /bin/rm -fv $PKICERT/ip-*.pem $PKICERT/certs/$CERT

# Install the new general-purpose cert

/usr/bin/sudo /usr/bin/install -v -m600 /tmp/$PEM $PKICERT/

# Install imap cert

/usr/bin/sudo /usr/bin/install -v -m600 "/tmp/$CERT" "$PKICERT/certs/"
link

answered 04 May '10, 02:23

KenJackson's gravatar image

KenJackson
5113
accept rate: 0%

I have to admit that I have configured my "real" mail server (running postfix) to block anything sent from a dynamic IP - too much garbage/SPAM otherwise. I run a backup postfix mail server on my home dynamic IP too, but I have it use the postfix "relayhost" parameter to send mail through my ISP's mail server so email doesn't get rejected by the receiving mail servers. I second the votes for Postfix - it's awesome, skip sendmail!

(04 May '10, 05:26) Acorp

I configured Postfix and it seems to work great but, using it with a dynamic ip does not cut it. Most dynamic ip are blacklisted and most mail server block incoming mail from these addresses. I tried using something like no-ip.com but, my ip changed too frequently. After an ip changed I had to remove it from the blacklist, that happened every other day so by the time the changes got propagated the ip changed again. Too much work.

link

answered 04 May '10, 13:02

Wilson's gravatar image

Wilson
312
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×6

Asked: 03 May '10, 13:56

Seen: 4,616 times

Last updated: 04 May '10, 13:02

powered by OSQA