How To Set Up A Postfix Autoresponder With Autoresponse

Similar documents
Managing Xen With Xen-Tools, Xen-Shell, And Argo

Preventing Brute Force Attacks With Fail2ban On Debian Etch

Chrooted SFTP With MySecureShell On Debian Etch

Setting Up PHPlist (Open-Source Newsletter Manager)

Installing MyDNS And The MyDNSConfig Control Panel On Fedora 8

Installing memcached And The PHP5 memcache Module On Debian Etch (Apache2)

CipherMail Gateway Upgrade Guide

Linux Postfix Smtp (mail Server) Ssl Certificate Installation And Configuration

HUL SOVANNAROTH PANG DA TIP SAROTH

2017/12/27 07:31 (UTC) 1/7 Making Slackware Mail Server

How To Convert Physical Systems And Xen VMs Into OpenVZ Containers (Debian Etch)

How To Resize ext3 Partitions Without Losing Data

Recover Deleted Files With Scalpel

KVM Virtualization With Enomalism 2 On An Ubuntu 8.10 Server

How To Compile A Kernel - The Mandriva Way

Physics REU Unix Tutorial

Install Apache, PHP And MySQL On CentOS 7 (LAMP)

KVM Guest Management With Virt-Manager On Ubuntu 8.10

» Installing and configuring postfix Step 1» Assign static IP and hostname and add a host entry for the host name. Assign hostname in /etc/hostname

Computer Systems and Architecture

Setting Up Master-Master Replication With MySQL 5 On Debian Etch

Install latest version of Roundcube (Webmail) on CentOS 7

Postfix Mail Server. Kevin Chege ISOC

How To Repair MySQL Replication

Back Up (And Restore) LVM Partitions With LVM Snapshots

Xen: How to Convert An Image-Based Guest To An LVM-Based Guest

Monitoring Network Latency With Smokeping (Debian Etch)

Red Hat Ceph Storage 3

Installing LAMP on Ubuntu and (Lucid Lynx, Maverick Meerkat)

Perl and R Scripting for Biologists

Drupal Command Line Instructions Windows 7 List All Files >>>CLICK HERE<<<

CN Assignment I. 1. With an example explain how cookies are used in e-commerce application to improve the performance.

Tungsten Dashboard for Clustering. Eric M. Stone, COO

Setting Up A High-Availability Load Balancer (With Failover and Session Support) With HAProxy/Wackamole/Spread On Debian Etch

Ubuntu Practice and Configuration Post Installation Exercises interlab at AIT Bangkok, Thailand

Running A MyDNS Name Server On OpenBSD (MySQL/PHP + MyDNS + MyDNSConfig)

MIS Week 10. Operating System Security. Unix/Linux basics

Enable Integration with Facebook

This material is based on work supported by the National Science Foundation under Grant No

Webmail Which Webmail applications are available?

Back Up/Restore Hard Drives And Partitions With CloneZilla Live

Connect using Putty to a Linux Server

Lab 2A> ADDING USERS in Linux

Exim Practical. Patrick Okui. (based on materials from Brian Candler)

CSCM98 Lab Class #5 Getting familiar with the command line

Step 1 - Install Apache and PostgreSQL

Offloading NDO2DB To Remote Server

Manually Sending Mail Via Smtp Php Example

Computer Systems and Architecture

Everything about Linux User- and Filemanagement

Permission and Ownership

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1

Log Management Part 1: Using rsyslog

RTC 502 and its Git adapter, Git and its prerequisite

Ssmtp Sendmail Process Failed With Error Code 1

The Perfect Desktop - gos 1.0.1

INTRODUCTION TO LINUX

Setting up a Chaincoin Masternode

This document is intended for use by Nagios XI Administrators who wish to monitor JMX applications.

Introduction to Unix May 24, 2008

These instructions cover how to install and use pre-compiled binaries to monitor AIX 5.3 using NRPE.

Introduction to Linux

Migration of Existing NSM Server from standalone to an Extended HA environment

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

UNIT V. Dr.T.Logeswari. Unix Shell Programming - Forouzan

Unix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based.

Installation Manual InfraManage.NET Installation Instructions for Ubuntu

CS 361S - Network Security and Privacy Spring Project #2

RG-MACC_2.0 Installation Manual

Nagios User Guide. You can use apt-get to install these packages by running the following commands:

SETTING UP 3 WORDPRESS SITES ON APACHE AND UBUNTU BY RAMI

ARCHER Data Services Service Layer

Mills HPC Tutorial Series. Linux Basics I

Setup a mail server using Postfix, Mysql, SSL and Courier-IMAP Saturday, 25 March 2006 Last Updated Monday, 16 April 2007

CUSTOMER CONTROL PANEL... 2 DASHBOARD... 3 HOSTING &

Exim Practical. Part 2 is running basic tests. You don t need to modify the Exim configuration to do this.

Bitnami Subversion for Huawei Enterprise Cloud

Using Linux as a Virtual Machine

Exercise 1: Basic Tools

Red Hat Ceph Storage 3

Installing and Patching Oracle

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

Bitnami Dolibarr for Huawei Enterprise Cloud

Ticketing Service 1 Request Tracker (RT) Installation and Configuration

Overview of the UNIX File System. Navigating and Viewing Directories

Using KVM On Ubuntu 7.10 (Gutsy Gibbon)

Some Ubuntu Practice...

Getting your department account

Smtp Error My Code 554 Transaction Failed Data Reply

Using Your New Webmail

ClamAV 설치 ( 큐잉서버 ) serverb

Hardening The Linux Kernel With Grsecurity (Debian)

Installing The Asterisk PBX And The Asterisk Web-Based Provisioning GUI On Linux

WELCOME TO SS-E AFNOG NAIROBI, KENYA. Scalable Services English

User Accounts. The Passwd, Group, and Shadow Files

Virtual Hosting With PureFTPd And MySQL (Incl. Quota And Bandwidth Management) On CentOS 6.4

NRPE DOCUMENTATIOND. Copyright (c) Ethan Galstad. Last Updated: 17 November Contents

Avira AntiVir MailGate / Avira MailGate Suite HowTo

Introduction to Unix - Lab Exercise 0

This document is intended for use by Nagios Administrators that want to use Slack for notifications.

Transcription:

By Falko Timme Published: 2009-04-02 11:34 How To Set Up A Postfix Autoresponder With Autoresponse Version 1.0 Author: Falko Timme <ft [at] falkotimme [dot] com> Last edited 03/25/2009 Autoresponse is an autoresponder for the Postfix MTA. It allows you to create autoresponder messages for email accounts from the shell and also by emailing the autoresponder text to a certain email address. I do not issue any guarantee that this will work for you! 1 Preliminary Note The setup that I describe here works for all my "Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail" setups. I don't guarantee that it will work for other setups. I'm using such a "Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail" here and have set up the email account falko@example.com for which I want to create an autoresponder. 2 Installing Autoresponse We can download and install Autoresponse as follows: cd /tmp wget http://www.nefaria.com/scriptz/autoresponse-1.6.2.tar.gz tar xvfz autoresponse-1.6.2.tar.gz Copyright 2009 All Rights Reserved. HowtoForge Page 1 of 7

cd autoresponse useradd -d /var/spool/autoresponse -s `which nologin` autoresponse mkdir -p /var/spool/autoresponse/log /var/spool/autoresponse/responses cp./autoresponse /usr/local/sbin/ chown -R autoresponse:autoresponse /var/spool/autoresponse chmod -R 0770 /var/spool/autoresponse Then we edit /etc/postfix/master.cf: vi /etc/postfix/master.cf At the beginning of the file, you should see the line smtp inet n - - - - smtpd Modify it so that it looks as follows (the second line must begin with at least one whitespace!): smtp inet n - - - - smtpd Copyright 2009 All Rights Reserved. HowtoForge Page 2 of 7

-o content_filter=autoresponder:dummy At the end of the file, append the following two lines (again, the second line must begin with at least one whitespace!): autoresponder unix - n n - - pipe flags=fq user=autoresponse argv=/usr/local/sbin/autoresponse -s ${sender} -r ${recipient} -S ${sasl_username} -C ${client_address} Then run... postconf -e 'autoresponder_destination_recipient_limit = 1'... and restart Postfix: /etc/init.d/postfix restart If you have users with shell access, and you want these users to be able to create autoresponder messages themselves on the shell, you must add each user account to the autoresponse group, e.g. as follows for the system user falko: usermod -G autoresponse falko However, this is not necessary if you want to create all autoresponder messages as root (or use the email feature to create autoresponder messages - I'll come to that in a moment). 3 Using Autoresponse Copyright 2009 All Rights Reserved. HowtoForge Page 3 of 7

Run autoresponse -h to learn how to use Autoresponse: server1:~# autoresponse -h /usr/local/sbin/autoresponse [-r {recipient email} -s {sender email} -S {sasl username} -C {client ip}] [-e {email address}] [-d {email address}] [-E {email address}] [-D {email address}] [-h] -r, -s, -S, and optionally -C must be used together to specify a recipient, sender, sasl username, and client IP of an autoresponse message. Normally you configure these in postfix's "master.cf" but they can be used from the terminal as well (only for testing purposes!). If this is executed from a terminal, you'll need to hit CTRL-D when you are finished typing your autoresponse message. -e is used to create a new autoresponse or edit an existing one for the specified user. If a disabled autoresponse message exists, it will be ignored and a new message will be created. -d is used to disable an existing active autoresponse message. t, -E is used to enable an existing autoresponse message. If both a disabled AND and an active autoresponse message exis the active message will be overwritten by the disabled one. -D is used to delete an existing autoresponse message, it will not delete disabled autoresponse messages. -h prints this help menu server1:~# Copyright 2009 All Rights Reserved. HowtoForge Page 4 of 7

To create an autoresponder message for the account falko@example.com, we run... autoresponse -e falko@example.com... and type in the autoresponder text: I will be out the week of March 2 with very limited access to email. I will respond as soon as possible. Thanks! Falko (You cannot set the subject using this method; by default, the subject of the autoresponder messages will be Out of Office.) Now send an email to falko@example.com from a different account, and you should get the autoresponder message back. To disable an existing autoresponder, run autoresponse -d falko@example.com To enable a deactivated autoresponder, run autoresponse -E falko@example.com To delete an autoresponder, run autoresponse -D falko@example.com Copyright 2009 All Rights Reserved. HowtoForge Page 5 of 7

You can modify the RESPONSE_RATE variable in /usr/local/sbin/autoresponse. It defines the time limit (in seconds) that determines how often an autoresponder message will be sent, per email address. The default value is 86400 (seconds) which means if you send an email to falko@example.com and receive an autoresponder message and send a second email to falko@example.com within 86400 seconds (one day), you will not receive another autoresponder message. vi /usr/local/sbin/autoresponse declare RESPONSE_RATE="86400" 4 Creating/Deleting Autoresponder Messages By Email Instead of creating autoresponder messages on the command line, this can also be done by email. If you want to create an autoresponder message for the email address falko@example.com, send an email from falko@example.com to falko+autoresponse@example.com (this works only if you've set up SMTP-AUTH on your server). The subject of that email will become the subject of the autoresponder message (that way you can define subjects different from Out of Office), and the email body will become the autoresponder text. If you create an autoresponder this way, Autoresponse will send you an email back like this one (so that you know if the operation was successful): Autoresponse enabled for falko@example.com by SASL authenticated user: falko@example.com from: 192.168.0.200 If there's already an active autoresponder for that email address, it will be disabled (i.e., there's no active autoresponder at all for that address anymore, and you will receive an email telling you so: Autoresponse disabled for falko@example.com by SASL authenticated user: falko@example.com from: 192.168.0.200 ). This means the email feature is a toggle switch - if there's no sautoresponder, it will be created, and if there's an autoresponder, it will be disabled. Copyright 2009 All Rights Reserved. HowtoForge Page 6 of 7

5 Links - Autoresponse: http://nefaria.com/?page_id=7 Copyright 2009 All Rights Reserved. HowtoForge Page 7 of 7