Sponsored Content
Full Discussion: Procmail and infinite loop
Top Forums UNIX for Advanced & Expert Users Procmail and infinite loop Post 302417434 by jhtrice on Thursday 29th of April 2010 02:46:38 PM
Old 04-29-2010
procmailex

From procmailex:

Suppose you have two accounts, you use both accounts regularly, but they are in very distinct places (i.e., you can only
read mail that arrived at either one of the accounts). You would like to forward mail arriving at account one to
account two, and the other way around. The first thing that comes to mind is using .forward files at both sites; this
won\u2019t work of course, since you will be creating a mail loop. This mail loop can be avoided by inserting the following
recipe in front of all other recipes in the $HOME/.procmailrc files on both sites. If you make sure that you add the
same X-Loop: field at both sites, mail can now safely be forwarded to the other account from either of them.
Code:
              :0 c
              * !^X-Loop: yourname@your.main.mail.address
              | formail -A "X-Loop: yourname@your.main.mail.address" | \
                 $SENDMAIL -oi yourname@the.other.account


Last edited by zaxxon; 04-30-2010 at 08:47 AM.. Reason: use code tags please, ty
 

10 More Discussions You Might Find Interesting

1. Solaris

ls command in infinite Loop

Hi, whenever I am giving a 'ls' command system is going into infinite loop displaying the current home directory. There is no separate shell script/file with ls name anywhere in the system. I am using Solaris 10. Any help / guidance in solving this problem is highly appreciated. ... (3 Replies)
Discussion started by: umakant
3 Replies

2. Shell Programming and Scripting

Infinite loop not looping

Hi guys, I'm having a problem getting my infinite loop to loop. It simply reads in the users choice form the menu, executes the corresponding case statement and quits instead of looping back to the main menu again. I have a feeling it might be something with my if then statements within the case... (2 Replies)
Discussion started by: hootdocta5
2 Replies

3. Programming

Is my code in an Infinite Loop?

Production C code compiled without the dash-g option is running, and seems to be in an infinite loop. Is there a way to tell? Is there a diagnostic tool that will report what objects or what lines of code or even what functions are being executed? Or is my best option to kill it with a dump? ... (5 Replies)
Discussion started by: marcus121
5 Replies

4. Shell Programming and Scripting

infinite while do loop problem

hi all, this is how my scrip looks like #!/bin/sh bindir='/opt/apps/script/bin' datadir='/opt/apps/script/data' dir='/opt/apps/script' while : ; do ls -1rt /opt/apps/script/data/check.txt*|tail -1 > /dev/null 2>&1 if ;then chmod +rwx $bindir/dummy2.sh ... (8 Replies)
Discussion started by: tententen
8 Replies

5. Shell Programming and Scripting

Infinite while loop

what is the difference between while:,while true and while false? (6 Replies)
Discussion started by: proactiveaditya
6 Replies

6. Shell Programming and Scripting

Call a infinite loop

Hi All, I need to run an infinite loop. requirement below: function1 --> creates a file file1 function2 ---> need to call if the file creates i am running these both function via a script --> script.sh i need to run the function1 first and if the file file1 creates then need to run the... (3 Replies)
Discussion started by: satyaranjon
3 Replies

7. Homework & Coursework Questions

Help with infinite loop problem

1. The problem statement, all variables and given/known data: My problem is an infinite loop when i press any other key other then Y or y in the while loop. what i want it to do is return to the normal script outside of it if pressing N or n or keep asking the same question if its any other... (4 Replies)
Discussion started by: Ren_kun
4 Replies

8. Shell Programming and Scripting

My for loop decides to become an infinite loop?

Hi, I was debating if I should put this in the dummies or scripts section, I apologize in advance if I chose poorly. Fairly new to Unix and BASH scripting but I thought I made it fairly well given my limited understanding. However, the output indicates that it's looping and I'm ending up with a... (5 Replies)
Discussion started by: gotreef
5 Replies

9. Shell Programming and Scripting

How to stop infinite loop

Im unable to stop the below infinite loop (bash script). Can someone tell me why this isnt responding to signals eg: ctrl+c (SIGINT) or ctrl+z c=0 test_loop() { c=$(($c+1)) echo "count value is : $c " sleep 1 test_loop } Im using: SunOS 5.10 PS: If run this as... (13 Replies)
Discussion started by: Arun_Linux
13 Replies

10. Shell Programming and Scripting

Infinite loop query

I have a script script.shwhich is scheduled to run at 11 AM everyday. # script.sh Code: ./scb_script.sh & unfortunately scb_script.sh is running today in infinite loop as respective files are not available. My question, when script.sh starts running tomorrow, will the old process be... (1 Reply)
Discussion started by: JSKOBS
1 Replies
2004-04-15

      mailping

      0.0.4

MAILPING-STORE(1)						     Mailping							 MAILPING-STORE(1)

NAME
mailping-store - store email from stdin to a mailping incoming maildir SYNOPSIS
mailping-store DESCRIPTION
mailping-store reads an email from standard input and writes it into a maildir chosen according to following logic: 1. If EXTENSION is not set, select Maildir. 2. If EXTENSION is set, ensure its value is safe to use, and select EXTENSION/incoming. mailping-store is usually run from a .forward file, and thus the filenames above are relative to the home directory of the account in question. Normal use Normally, mailping-store is used to ease the setup of new circuits to probe from mailping-cron. This is done with a system account mailping using <mailping@yourhost.example.com> as the from address, and <mailping+circuitname@yourhost.example.com> (or some remote address aliased to that) as the to address. In fact, these are the default values for from and to, so you can just skip creating those configuration files. This allows adding new test circuits without any changes to the email configuration. FILES
/var/lib/mailping/state/circuit/incoming Maildir to store the email to. /var/lib/mailping/state/Maildir/ Maildir to store the email to, if no extension was given. ENVIRONMENT
MAILPING_STATEDIR Override the location of the state directory. Circuit states are stored in the state subdirectory of this directory, in subdirectories named after the circuit name. Default: /var/lib/mailping EXTENSION Name of the current circuit to store the mail for. SEE ALSO
mailping-cron(1), mailping-success(1), mailping-latency(1) AUTHOR
Tommi Virtanen <tv@havoc.fi> Havoc Consulting Author. COPYRIGHT
Copyright (C) 2004 Havoc Consulting mailping 0. 2004-04-15 MAILPING-STORE(1)
All times are GMT -4. The time now is 12:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy