Skip to content

Margus Roo –

If you're inventing and pioneering, you have to be willing to be misunderstood for long periods of time

  • Cloudbreak Autoscale fix
  • Endast

Postfix & Sendmail stuff

Posted on April 24, 2007 - July 27, 2009 by margusja

postfix and regexp.
Juhul kui tahate kasutada postfix regexp mappe siis on tarvis lisada main.cf faili:
virtual_alias_maps = regexp:/path/regexp
Ning /path/regexp faili näitek kui ma tahan et margusja1@kodila.ee, margusja2@kodila.ee jne tuleksid aadressile margusja@kodila.ee rida:
/^margusja[0-9]+@kodila\.ee$/ margusja@kodila.ee
Kontrollida kas regexp reegel töötab saab:
postmap -q margusja1@kodila.ee regexp:/path/regexp

Kord juhtunud jälle nii, et mailid liiguvad kenasti aga mida ei ole on maillog. Viga oli syslog deemonis.

Suht plank postfix konfi juures juhtub see et kui sinu hallatavas postfix masinas on queue MAILER-DEAMON teateid täis, kus sinu postfix soovib remote saatjale teadata et ei ole sellist maili. 99 prossa pole neid saatjaid olemas.  abx mailq | grep MAILER | awk ‘{print $1}’ | sed s,*,,g | postsuper -d –

Interesting shell code.

mailq | tail +2 | grep -v ‘^ *(‘ | awk ‘BEGIN { RS = “” }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == “user@example.com” && $9 == “”)
print $1 }
‘ | tr -d ‘*!’ | postsuper -d –

Posted in Linux

Post navigation

Lihtsalt minuarust lahe pilt.
Minu videod

Leave a Reply

You must be logged in to post a comment.

The Master

Categories

  • Apache
  • Apple
  • Assembler
  • Audi
  • BigData
  • BMW
  • C
  • Elektroonika
  • Fun
  • Hadoop
  • help
  • Infotehnoloogia koolis
  • IOT
  • IT
  • IT eetilised
  • Java
  • Langevarjundus
  • Lapsed
  • lastekodu
  • Linux
  • M-401
  • Mac
  • Machine Learning
  • Matemaatika
  • Math
  • MSP430
  • Muusika
  • neo4j
  • openCL
  • Õpetaja identiteet ja tegevusvõimekus
  • oracle
  • PHP
  • PostgreSql
  • ProM
  • R
  • Turvalisus
  • Varia
  • Windows
Proudly powered by WordPress | Theme: micro, developed by DevriX.