-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmailaliases.php
More file actions
executable file
·21 lines (20 loc) · 1 KB
/
mailaliases.php
File metadata and controls
executable file
·21 lines (20 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?
require("constants.php");
echo 'postmaster: [email protected]
webmaster: [email protected]
root: [email protected]
support: [email protected]
lqfbsupport: [email protected]
';
$dbconn = pg_connect("dbname=liquid_feedback") or die('Verbindungsaufbau fehlgeschlagen: ' . pg_last_error());
$query = "SELECT name,notify_email FROM member WHERE name NOTNULL AND notify_email NOTNULL AND name != '' AND notify_email != ''";
$result = pg_query($query) or die('Abfrage fehlgeschlagen: ' . pg_last_error());
while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) {
if (preg_match('/^[^0-9][a-zA-Z0-9_-]+([.][a-zA-Z0-9_-]+)*$/', $line['name']) && preg_match('/^[^0-9][a-zA-Z0-9_-]+([.][a-zA-Z0-9_-]+)*[@][a-zA-Z0-9_-]+([.][a-zA-Z0-9_-]+)*[.][a-zA-Z]{2,4}$/', $line['notify_email']) && !preg_match('/^.*@liquid.piratenpartei.at$/', $line['notify_email']))
{
echo $line['name'] . ": " . $line['notify_email'] . "\n";
}
}
pg_free_result($result);
pg_close($dbconn);
?>