[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [rhelv5-list] Regular Expressions on RHEL 5



Ian Lists wrote:
It's just a script to download email address to populate my relay recipient map for postfix. It's not pretty and I'm definitely not a shell scripter but it seems to work.

Since you now have it working, it seems I was chasing a red herring, but I'd still like you to answer the question, "What do you think the redirection does?"


#!/bin/bash
#-----------------------------------------------------------------
#
# Script for download and updating Relay Recipients...

# Working directory
WDIR=/etc/postfix
# URL of file to be downloaded
URL=https://myservername/mail/
# Filename of file to be worked with
FNAME=relay_recipients
WGETOPTS=" -N --no-check-certificate"
set -o errexit

cd $WDIR
wget $WGETOPTS ${URL}/${FNAME} 2>&1 >/dev/null | egrep -q '[Nn]ot (retrieving|Found)' && exit
but what do you think this does  ^^^^^^^^^^^^^^^

postmap $FNAME
logger -p mail.info -t UPDATED.POSTFIX Relay Recipients Map
exit 0



Ian



--

Cheers
John

-- spambait
1aaaaaaa coco merseine nu  Z1aaaaaaa coco merseine nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]