aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-10-24 09:51:55 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-10-24 09:51:55 +0000
commit0ca6b18ac2baca53042f00062383107a058c5fea (patch)
tree46083419599d64fbff597c4dc6f23bfd272267e7
parent9f535cef97966cd28c4c0d9efc82b1a3a49aef7a (diff)
downloadmailfromd-0ca6b18ac2baca53042f00062383107a058c5fea.tar.gz
mailfromd-0ca6b18ac2baca53042f00062383107a058c5fea.tar.bz2
* mflib/verp.mf: New file.
* mflib/Makefile.am: Add verp.mf. git-svn-id: file:///svnroot/mailfromd/trunk@1705 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r--ChangeLog5
-rw-r--r--mflib/Makefile.am1
-rw-r--r--mflib/verp.mf33
3 files changed, 39 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 73daac05..9bc75b2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-24 Sergey Poznyakoff <gray@gnu.org.ua>
+
+ * mflib/verp.mf: New file.
+ * mflib/Makefile.am: Add verp.mf.
+
2008-10-22 Sergey Poznyakoff <gray@gnu.org.ua>
* gacopyz/server.c (gacopyz_srv_abort): Reset state to srv_ready.
diff --git a/mflib/Makefile.am b/mflib/Makefile.am
index d0bb21ad..fc85f207 100644
--- a/mflib/Makefile.am
+++ b/mflib/Makefile.am
@@ -29,6 +29,7 @@ inc_DATA =\
spf.mf\
strip_domain_part.mf\
valid_domain.mf\
+ verp.mf\
$(PP_SETUP_FILE)
EXTRA_DIST=$(inc_DATA) pp-setup dns.mf4 safedb.mf4
diff --git a/mflib/verp.mf b/mflib/verp.mf
new file mode 100644
index 00000000..509edb85
--- /dev/null
+++ b/mflib/verp.mf
@@ -0,0 +1,33 @@
+/* VERP address extractor.
+ Copyright (C) 2008 Sergey Poznyakoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#pragma regex push +extended
+
+func verp_extract_user(string domain)
+ returns string
+do
+ if $f matches "(.*)=%domain@.*"
+ string s \1
+ if %s matches '.*\+([^\+]+)$' and validuser(\1)
+ return \1
+ elif %s matches 'sentto-[0-9]{7}-[0-9]{4}-[0-9]{10}-(.*)$' and validuser(\1)
+ return \1
+ fi
+ fi
+ return ""
+done
+
+#pragma regex pop

Return to:

Send suggestions and report system problems to the System administrator.