View previous topic :: View next topic |
Author |
Message |
zeky Guru
Joined: 24 Feb 2003 Posts: 470 Location: Vukojebina, Europe
|
Posted: Fri Jan 30, 2004 10:00 am Post subject: SSMTP config file |
|
|
Hello!
I found this useful scruipt while googling for ssmtp.conf sample files. The script works fine and comes handy IMHO
Hope it comes handy for you too
Here is the code:
Code: |
#!/bin/bash
################################################################################
#
# File: setup_ssmtp
# Description: This script sets up ssmtp mail configuration
# Author: Andrew@DeFaria.com
# Created: Wed Jan 9 12:57:13 2002
# Language: Bash Shell
# Modifications:<modifications>
#
# (c) Copyright 2002, Andrew@DeFaria.com, all rights reserved
#
################################################################################
# Setup /etc/ssmtp config directory
ssmtp_dir=/etc/ssmtp
domain=<your domain>
mail_server=<your mail server>
mkdir -p $ssmtp_dir
chmod 700 $ssmtp_dir
# Make some simple aliases. Alias $USER to the proper email address and then
# alias root, Administrator and postmaster to the user's address thus making
# the user "god" of smtp on this machine only.
cat > $ssmtp_dir/revaliases <<EOF
# sSMTP aliases
#
# Format: local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain:[port]
# where [port] is an optional port number that defaults to 25.
$USER:$USER@$domain:$mail_server:25
root:$USER@$domain:$mail_server:25
Administrator:$USER@$domain:$mail_server:25
postmaster:$USER@$domain:$mail_server:25
EOF
# Get a downshifted hostname
hostname=$(hostname | tr '[:upper:]' '[:lower:]')
# Make ssmtp.conf
cat > $ssmtp_dir/ssmtp.conf <<EOF
# ssmtp.conf: Config file for Cygwin's sstmp sendmail
#
# The person who gets all mail for userids < 10
root=postmaster
# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and you mailhub is so named.
mailhub=$mail_server
# Where will the mail seem to come from?
#rewriteDomain=$USER.$domain
# The full hostname
hostname=$hostname.$domain
# Set this to never rewrite the "From:" line (unless not given) and to
# use that address in the "from line" of the envelope.
#FromLineOverride=YES
EOF
|
_________________ Beat your dick like it owes you money |
|
Back to top |
|
|
ikaro Advocate
Joined: 14 Jul 2003 Posts: 2527 Location: Denmark
|
Posted: Fri Jan 30, 2004 6:12 pm Post subject: |
|
|
erm ok thx for sharing :)
have a nice weekend. _________________ linux: #232767 |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|