Comments (10)
Hey, thank you very much for your contribution. I will add it as soon as I am back at my computer. :-) Happy holidays!
from postsrsd.
I am unable to access the provided link. Is your server down?
from postsrsd.
Confirmed, I can't download it too.
from postsrsd.
it is still up all the time.. maybe IPv6 problem. please try this: http://194.160.142.50/trash/postsrsd.redhat.init . If not work, just send tell me email and I will provide it shortly.
from postsrsd.
I re-inserted the macros for consistency with the other init scripts. Could you test this and give me feedback if something went wrong?
from postsrsd.
After looking up the daemon command, I decided not to add the install path to the PATH environment variable and run the daemon with the full path instead. Also, I did not put all command line arguments into a single OPTS variable, because this messes up the shell quotation if an option contains spaces (e.g. SRS_EXCLUDE_DOMAINS).
from postsrsd.
because this messes up the shell quotation if an option contains spaces (e.g. SRS_EXCLUDE_DOMAINS).
what is the problem here? I am using several excluded domains and if I've look on running process arguments it looks like this:
postsrsd -d -4 -f10001 -r10002 -dexample.com -s/etc/postsrsd.secret -unobody -p/var/run/postsrsd.pid -c/usr/local/lib/postsrsd -X.example.com example.org example.local -D
it is something wrong with this example?
Two more things:
Firstly this script is not counting with case, there SRS_EXCLUDE_DOMAINS list will be empty. Something like following test:
if [ -n "${SRS_EXCLUDE_DOMAINS}" ]
then
OPT_EXCL_DOMAINS="-X${SRS_EXCLUDE_DOMAINS}"
fi
...
daemon $DAEMON -4 -f"$SRS_FORWARD_PORT" -r"$SRS_REVERSE_PORT" -d"$SRS_DOMAIN" -s"$SRS_SECRET"
-u"$RUN_AS" -p"$PIDFILE" -c"$CHROOT" -D ${OPT_EXCL_DOMAINS}
...
Secondly: with "set -e" the init script is simply not working at all. It exits on ". /etc/init.d/functions". Not sure if "set -e" is the usual part of redhat init scripts. That was the reason why I decided to remove this line at beginning.
from postsrsd.
postsrsd -X.example.com example.org example.local
it is something wrong with this example?
There was a bug in the command line parser: the first argument is used for -X, and the subsequent arguments are parsed as positional arguments, which were silently ignored. I added a check for that in ea35d05
this script is not counting with case, there SRS_EXCLUDE_DOMAINS list will be empty.
The -X argument may have an empty list, so the script does not have to check.
from postsrsd.
I forgot to answer the original question: The domain list has to be double-quoted to be parsed by the shell as single word and given as a single argument to the -X option. The indirection with the OPTS variable makes that impossible.
from postsrsd.
Ok, understand, "-X" can be used even without any list of domains. Tested and it is working. Thanks.
from postsrsd.
Related Issues (20)
- 553 5.1.7 local part too long in HOT 6
- unknown canonical_classes value "header_recipien" in "envelope_recipient, header_recipien" HOT 2
- Systemd unit fails to start if postfix is not installed HOT 5
- Systemd service startup failure in PostSRSd 1.8 / `SRS_EXTRA_OPTIONS` empty argument HOT 3
- Rewrite sender addresses based on recipient domain HOT 6
- 100% CPU usage without further logs or ports opened HOT 7
- multiple domains must be separated by comma
- `make -j` fails with `undefined reference to symbol '__pthread_unregister_cancel@@GLIBC_2.3.3'` HOT 3
- cmake hangs HOT 8
- build: improve default systemd unitdir HOT 1
- drop_privileges does not drop enough
- Installation error. HOT 2
- Not created milter socket file. HOT 2
- Endless loop HOT 2
- Socketmap Permission denied / Postfix chroot problem? HOT 13
- 2.x supports CLI args but dropped `-h` HOT 1
- Using Github Actions to distribute releases HOT 5
- Looking for new Debian maintainer
- Segfault when using redis through a unix socket
- /usr/sbin/postsrsd: unrecognized option: f HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postsrsd.